-
-
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
[Popper] Add missing styleOverrides
Popper type in theme
#39154
Conversation
Netlify deploy previewhttps://deploy-preview-39154--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@axelbostrom Thank you for resolving this issue! Importing PopperClassKey
from MUI Base is indeed the correct approach. Could you also include a TypeScript test to ensure its proper functionality in the createTheme.spec.ts
file at this location? This test will help confirm that everything is working as expected.
styleOverrides
type in theme
Co-authored-by: Zeeshan Tamboli <[email protected]> Signed-off-by: Axel Boström <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@axelbostrom Could you act on this comment as well to add a test?
@ZeeshanTamboli I am trying yes, but have some minor issues writing the test. Looking at it now and will see if I can solve it, otherwise maybe you could assist me? Edit: I am a little confused to what I should do in the .spec.ts file. When adding things here, nothing seems to happen. Should I not add the tests to the test.js file? If so, then I am done with the tests. |
diff --git a/packages/mui-material/src/styles/createTheme.spec.ts b/packages/mui-material/src/styles/createTheme.spec.ts
index f86a12a414..897077f2b1 100644
--- a/packages/mui-material/src/styles/createTheme.spec.ts
+++ b/packages/mui-material/src/styles/createTheme.spec.ts
@@ -66,6 +66,13 @@ const theme = createTheme();
{
createTheme({
components: {
+ MuiPopper: {
+ styleOverrides: {
+ label: {
+ color: 'black',
+ },
+ },
+ },
MuiFormControlLabel: {
styleOverrides: {
root: { @axelbostrom Add another key like this, and you can run the type tests locally from the repo root with The corresponding job in the Ci is |
@axelbostrom Adding tests to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@axelbostrom I added the pending TypeScript test. Thank you for your contribution! Looking forward for more.
styleOverrides
type in themestyleOverrides
Popper type in theme
Fixes #38936, if the import path is OK?
Before: https://codesandbox.io/s/stoic-frost-jwqttr
After: https://codesandbox.io/s/sharp-waterfall-xkcqqj