Skip to content

[material-ui][AlertTitle] Enable extending Typography props#42269

Merged
ZeeshanTamboli merged 5 commits intomui:nextfrom
lucasgmelo:fix/alert-title-types
May 22, 2024
Merged

[material-ui][AlertTitle] Enable extending Typography props#42269
ZeeshanTamboli merged 5 commits intomui:nextfrom
lucasgmelo:fix/alert-title-types

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 scope: alert Changes related to the alert. label May 17, 2024
@zannager zannager requested a review from siriwatknp May 17, 2024 10:53
@ZeeshanTamboli ZeeshanTamboli added type: bug It doesn't behave as expected. typescript package: material-ui 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
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

needs cherry-pick The PR should be cherry-picked to master after merge. scope: alert Changes related to the alert. type: bug It doesn't behave as expected. 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