[docs] Styled API Example (5 lines)#11620
Merged
oliviertassinari merged 3 commits intomui:masterfrom May 29, 2018
Merged
Conversation
Member
|
@mssngr Thanks for the pull-request.
But it's no longer following the styled-components API. I mean, it's introducing an important difference. Also, this doesn't work for styling the native dom elements. The classes.root need to be applied as a className. The current API ask for the same "hack" than with styled-components: https://material-ui.com/guides/interoperability/#styled-components. I'm not convinced documenting your version would be a better default, while it's definitely interesting. |
Contributor
Author
|
Good feedback, thanks! And, I don't know how I missed that page of the documentation. I've gotta rethink my styling strategy, now. |
This was referenced Dec 28, 2020
This was referenced Mar 14, 2021
This was referenced Mar 15, 2021
This was referenced Nov 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was implementing the styled-components API example, but I needed to be able to set classes to the various sub classes in many of
material-ui's components (such aspaperin theDrawercomponent.) I then realized the API example could be written much more simply while giving it that extra bit of functionality. Decided to do a PR, since it worked so well for me.styled-componentsAPI example down to 5 linesclassesfunctionality to thestyled-componentsAPI example