Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snackbar] Add customization example #11597

Merged
merged 2 commits into from
May 27, 2018
Merged

[Snackbar] Add customization example #11597

merged 2 commits into from
May 27, 2018

Conversation

mbrn
Copy link
Contributor

@mbrn mbrn commented May 26, 2018

[NotificationBar] component has been added

@oliviertassinari
Copy link
Member

@mbrn Thanks for your time. However, it doesn't align with our vision. We want to focus on core low-level components to enable people, like you, to build higher-level components like this one. In that sense, we are very happy to see this pull-request.

Instead, what do you think of adding a customization demo to the Snackbar like we do with the Tabs, Button, Table or TextField? At the office, we have been overriding the Snackbar style to do something very close to what you are proposing.

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation component: snackbar This is the name of the generic UI component, not the React module! labels May 26, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented May 26, 2018

(please, don't close this pull-request to open another!)

@oliviertassinari oliviertassinari self-assigned this May 26, 2018
@mbrn
Copy link
Contributor Author

mbrn commented May 26, 2018

@oliviertassinari thanks for your reply. It's not problem for me. I can use this component as an independent repo and publish to npmjs.org. Maybe you can add this component to related-project page. Or we can add this to Paper component as customization demo. What do you think?

Adding customization to snack-bar was my second idea after this one:). I need snack-bar which has status. So this is a good idea.

@oliviertassinari
Copy link
Member

oliviertassinari commented May 27, 2018

Here we go, I have updated the pull-request to add a snackbar customization demo:

0 0 0 0_3000_demos_snackbars

@oliviertassinari oliviertassinari changed the title [NotificationBar] component has been added [Snackbar] Add customization example May 27, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented May 27, 2018

A second iteration with 20 less line of codes:

capture d ecran 2018-05-27 a 14 54 35

@oliviertassinari oliviertassinari merged commit b34a1d7 into mui:master May 27, 2018
@mbrookes
Copy link
Member

mbrookes commented May 27, 2018

@mbrn's icons were a bit more consistent:

(Error, Warning, Info, CheckCircle)

And the semi-transparency is a nice touch.

@oliviertassinari
Copy link
Member

@mbrookes Good feedback. I'm on it :).

@mbrn
Copy link
Contributor Author

mbrn commented May 28, 2018

Thx @mbrookes & @oliviertassinari. Additionally we could add "info, success, warning" fields to Palette. In this way we can use these bars' color from theme.

@oliviertassinari
Copy link
Member

Additionally we could add "info, success, warning" fields to Palette. In this way we can use these bars' color from theme.

It's what we do at the office 👍. Users are free to do it on their side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: snackbar This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants