Allow overriding props in styled #44456
Labels
package: system
Specific to @mui/system
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Summary
When created reusable components, it is often very helpful to pass default props to the component.
Adding
props
tointerface MuiStyledOptions
will allow the users to set these props.Examples
One use case:
Creating a reusable outlined button with extra css.
Instead of doing:
and always remembering to add the variant when using the component, we can do this:
I know the css here is generic but the possibilities are endless
Motivation
Improving DX when creating reusable components, and minimizing human error
Search keywords: props defaults custom
The text was updated successfully, but these errors were encountered: