Skip to content

[material-ui][FloatingActionButton] Convert to support CSS extraction#41851

Merged
siriwatknp merged 4 commits intomui:nextfrom
gijsbotje:pigment-css/fab
Apr 12, 2024
Merged

[material-ui][FloatingActionButton] Convert to support CSS extraction#41851
siriwatknp merged 4 commits intomui:nextfrom
gijsbotje:pigment-css/fab

Conversation

@gijsbotje
Copy link
Contributor

@gijsbotje gijsbotje commented Apr 10, 2024

Part of #41273

@siriwatknp

I found 2 problems.

It seems the sx prop in the example doesn't work. I couldn't find how this should be fixed. This results in a gray left aligned Fab, instead of a right aligned green fab.

Pigment Current
image image

In dark mode it also uses the css var for primary text to style the default button. This results in white text on the grey[300] background. without vars it uses the getContrastText function to determine a color.

color: theme.vars
      ? theme.vars.palette.text.primary
      : theme.palette.getContrastText?.(theme.palette.grey[300])
image

Full examples page

light dark
localhost_3000_material-ui_react-floating-action-button (1) localhost_3000_material-ui_react-floating-action-button

@mui-bot
Copy link

mui-bot commented Apr 12, 2024

Netlify deploy preview

https://deploy-preview-41851--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against a6a3db2

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nicely done.

@siriwatknp siriwatknp merged commit 1e59ca3 into mui:next Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: Fab The React component. package: pigment-css Specific to Pigment CSS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants