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][AppBar] Support all default palette colors in TypeScript #39389

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

BreakBB
Copy link
Contributor

@BreakBB BreakBB commented Oct 11, 2023

@mui-bot
Copy link

mui-bot commented Oct 11, 2023

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against aa9daac

@BreakBB
Copy link
Contributor Author

BreakBB commented Oct 11, 2023

I am wondering if PropTypes.Color should be updated to contain the values in question?

type Color = 'inherit' | 'primary' | 'secondary' | 'default';

Currently it is only used at two places: AppBar and Fab. Maybe it can then be reused at more places?

@danilo-leal danilo-leal changed the title [AppBar] Support all default palette colors in TypeScript [material-ui][AppBar] Support all default palette colors in TypeScript Oct 11, 2023
@danilo-leal danilo-leal added component: app bar This is the name of the generic UI component, not the React module! typescript package: material-ui Specific to @mui/material labels Oct 11, 2023
@ZeeshanTamboli
Copy link
Member

I am wondering if PropTypes.Color should be updated to contain the values in question?

type Color = 'inherit' | 'primary' | 'secondary' | 'default';

Currently it is only used at two places: AppBar and Fab. Maybe it can then be reused at more places?

Ideally, yes, it should be defined in one place here, but let's not do it in this PR.

@ZeeshanTamboli ZeeshanTamboli added the bug 🐛 Something doesn't work label Oct 11, 2023
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the contribution!

@ZeeshanTamboli ZeeshanTamboli merged commit e417dcf into mui:master Oct 11, 2023
25 of 26 checks passed
@BreakBB BreakBB deleted the appbar-color-types branch October 11, 2023 13:31
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: app bar This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AppBar][material-ui] Type error for color property with "error", "warning" and "success" values
4 participants