Skip to content
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

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

Merged
merged 4 commits into from
Apr 12, 2024

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

@danilo-leal danilo-leal added package: material-ui Specific to @mui/material package: pigment-css Specific to @pigment-css/* component: Fab The React component. labels Apr 11, 2024
@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
19 checks passed
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: material-ui Specific to @mui/material package: pigment-css Specific to @pigment-css/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants