-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[system] Reexport Pigment CSS from index file #43218
[system] Reexport Pigment CSS from index file #43218
Conversation
Netlify deploy previewBundle size report |
This requires import {} from '@mui/material-pigment-css/theme';
import { Theme } from '@mui/material/styles';
declare module "@mui/material-pigment-css/theme" {
interface ThemeArgs {
theme: Theme
}
} I wonder if it makes more sense to augment the theme from |
@brijeshb42 Verified that the change is working as expected. |
const pigmentConfig = { | ||
transformLibraries: ['@mui/material'], | ||
}; |
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.
Some of these seem to have leaked from #43217?
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.
I reverted the changes on the migration-to-v6 which are not related to this PR. It looks good to me
Thanks @mnajdova |
@@ -200,6 +200,35 @@ pnpm dev | |||
|
|||
Open the browser and navigate to the localhost URL, you should see the app running with Pigment CSS. | |||
|
|||
### Typescript |
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.
### Typescript | |
### TypeScript |
Fixing this in #43751
Issue
The changes fixe theme augmentation issue with the latest beta:
Change
Remove the
@mui/material-pigment-css/theme
and reexport from the index directly. Usingtheme
subfolder adds unnecessary complexity and require user toimport type {} from @mui/material-pigment-css/theme
first.The change require users to set up TypeScript as below (documented in the migration guide):