Skip to content

[material][Badge] Replace useSlotProps with useSlot hook #45871

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

Merged
merged 3 commits into from
Apr 11, 2025

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Apr 10, 2025

This PR replaces usage of useSlotProps with useSlot hook and by updating component to use useSlot hook this issue got fixed as well.

There are few other components using useSlotProps hook, I'll replace it with useSlot hook.

closes #45867

@sai6855 sai6855 added component: badge This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material enhancement This is not a bug, nor a new feature labels Apr 10, 2025
@@ -11,3 +11,12 @@ function classesTest() {

<Badge anchorOrigin={{ vertical: 'bottom' }} />;
<Badge anchorOrigin={{ horizontal: 'left' }} />;
<Badge
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test for #45867

@mui-bot
Copy link

mui-bot commented Apr 10, 2025

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 1c6de69

@sai6855 sai6855 requested a review from siriwatknp April 10, 2025 14:56
@siriwatknp
Copy link
Member

Thanks for working on this 👏

@sai6855 sai6855 added v6.x needs cherry-pick The PR should be cherry-picked to master after merge labels Apr 11, 2025
@sai6855 sai6855 merged commit 50e0a70 into mui:master Apr 11, 2025
24 checks passed
Copy link

Cherry-pick PRs will be created targeting branches: v6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: badge This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature needs cherry-pick The PR should be cherry-picked to master after merge package: material-ui Specific to @mui/material v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Badge] slotProps for badge don't accept sx
3 participants