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

[Snackbar][base] Drop component prop #37041

Merged
merged 5 commits into from
Apr 28, 2023

Conversation

nicolas-ot
Copy link
Contributor

@nicolas-ot nicolas-ot commented Apr 26, 2023

BREAKING CHANGE

part of #36679
It will be covered by codemod, see #36831

For Base UI components, the component prop value should be moved to slots.root:

<Snackbar
-  component="span"
+  slots={{ root: "span" }}
 />

If using TypeScript, you should add the custom component type as a generic on the TabsList component.

-<Snackbar
+<Snackbar<typeof CustomComponent>
   slots={{ root: CustomComponent }}
   customProp
 />

@mui-bot
Copy link

mui-bot commented Apr 26, 2023

Netlify deploy preview

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against c06fcd2

@nicolas-ot nicolas-ot changed the title [Snackbar][base] Drop component propdrop component prop [Snackbar][base] Drop component prop Apr 26, 2023
@nicolas-ot nicolas-ot marked this pull request as ready for review April 26, 2023 16:52
@zannager zannager added component: snackbar This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Apr 27, 2023
@zannager zannager requested a review from mnajdova April 27, 2023 09:00
<Snackbar component="span" />
<Snackbar slots={{ root: 'span' }} />
```

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
:::info
The `slots` prop is available on all non-utility Base components.
See [Overriding component structure](/base/guides/overriding-component-structure/) for full details.
:::

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Copy link
Member

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@hbjORbj hbjORbj merged commit de11dc7 into mui:master Apr 28, 2023
binh1298 pushed a commit to binh1298/material-ui that referenced this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: snackbar This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants