[DialogTitle]Any way to change the DialogTitle (h2) style?
See original GitHub issueWhen applying style to the classes
attribute using the root
key, it can’t work since the component create an h2
tag internaly with a black color (the color injected thought the root
key is applied to its parent).
- This is a v1.x issue (v0.x is no longer maintained).
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
When injecting a color to the DialogTitle
component (though the classes.root
property or a JSS className
), i need it to not be overrided.
Current Behavior
When injecting a color to the DialogTitle
component (though the classes.root
property or a JSS className
), it is applied to the parent but an h2
tag with a black color overrides it.
Your Environment
Tech | Version |
---|---|
Material-UI | v1.0.0 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
How do I change font color in DialogTitle and DialogContent ...
The easiest way to do this is just to create a new component and add custom styles to it.
Read more >DialogTitle API - Material UI - MUI
API reference docs for the React DialogTitle component. ... The name MuiDialogTitle can be used when providing default props or style overrides in...
Read more >ARIA: dialog role - Accessibility - MDN Web Docs - Mozilla
The best way to achieve this is by using the aria-labelledby ... updated</h2> <p id="dialog1Desc"> You can change your details at any time ......
Read more >React MUI DialogTitle API - GeeksforGeeks
root (MuiDivider-root): It is the style applied to the root element. Approach: Let us create a React project and install React MUI module....
Read more >Dialog | Angular Material
A dialog is opened by calling the open method with a component to be loaded and ... [Attr] Dialog title, applied to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use the
disableTypography
property and provide your own.I’ve also run into this issue, since I would like to be able to use
component='h1'
without running into linting issues (invalid prop type).component='h1'
works, since it’s indirectly supported in the code (via...other
), but it’s kind of a hacky way of going about this and, in my case, requires ats-ignore
.Since
DialogTitle
is a styledTypography
component, why do we currently limit theTypography
props that can be changed on it? Just curious about the design decision here. Thanks!