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][AlertTitle] Enable extending Typography props #42269

Merged
merged 5 commits into from
May 22, 2024

Conversation

lucasgmelo
Copy link
Contributor

@lucasgmelo lucasgmelo commented May 16, 2024

AlertTitle is now extending the properties of the Typography component according to the documentation.
I used the Pick property from TypeScript because some properties existed in both components and had different types, so I made sure to add the ones that didn't exist in AlertTitle.

e.g. color

Interface 'AlertTitleProps' cannot simultaneously extend types 'TypographyProps' and 'InternalStandardProps<HTMLAttributes>'.
Named property 'color' of types 'TypographyProps' and 'InternalStandardProps<HTMLAttributes>' are not identical.ts(2320)

Fixes #42015

@mui-bot
Copy link

mui-bot commented May 16, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 572eab3

@zannager zannager added the component: alert This is the name of the generic UI component, not the React module! label May 17, 2024
@zannager zannager requested a review from siriwatknp May 17, 2024 10:53
@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work typescript package: material-ui Specific to @mui/material needs cherry-pick The PR should be cherry-picked to master after merge labels May 21, 2024
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.

@lucasgmelo Thanks for the pull request. I made the expected changes and also added a TypeScript test.

@ZeeshanTamboli ZeeshanTamboli merged commit 10e1722 into mui:next May 22, 2024
19 checks passed
github-actions bot pushed a commit that referenced this pull request May 22, 2024
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
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: alert This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][AlertTitle] Missing Typography props when using AlertTitle
4 participants