-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Remove DialogContentText, use Typography #12565
Comments
@atrauzzi From my perspective, the typography story of Material-UI starts with the The
The equivalent with Material-UI is: (the variant values will soon change with #12377, it will be simpler to grasp 🎉)
Is it ok to nest Typography component? Yes, I have personnaly been doing stuff like this: <Typogrpaghy component="ul">
<li>Foo</li>
<li><Typogrpaghy variant="caption">Material-UI</Typogrpaghy></li>
<Typogrpaghy> How should people handle the p > p issue? You can set the |
Alright, so based on my example above using This relates to something that I've wondered while using MUI: Is there a specific reason why
...but that seems inconsistent to dialog, despite having this Maybe at least for now my specific issue is with the fact that |
@atrauzzi I don't see the point of doing
Yes, it's. I think that we can kill the component in v2. |
Oh, nice! That definitely helps! Removing redundant blocks also for sure helps bring things together semantically. Thanks for all your help. |
I think that we can keep the component after all: #14795. |
Maybe I've got myself tripped up on another documentation opportunity...
We're making great progress right now in establishing a theme for our application(s), but amongst some of the research/snag items we've hit is one about the
Typography
component.In looking at some of the MUI component source code and based on our desire to specify little-T-typography in a standard way in certain circumstances, is there any guidance on whether using the
Typography
component is the right way to go about this?A simplified scenario might be say with a dialog:
When doing this using default MUI properties, we end up with DOM validation errors from the browser as follows:
This makes me suspect that nesting
Typography
and specifically using its variants might not be correct. Even despite the fact that I can force the element used to be say - aspan
locally, or even globally using my theme.So I guess this all boils down to what the best advice is for controlling typography. We definitely not inclined to have it be radically different throughout the application. But even with the above example, should we be using
Typography
or should we be specifying styles forDialogContentText
that are potentially duplicates ofTypography
configurations we have elsewhere in our theme?Are there times where we should only be adding inline children to MUI elements and is there any kind of rhyme/reason to that so that we can know ahead of time what our strategy should be?
The text was updated successfully, but these errors were encountered: