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

[docs] Use slot variants over theme.variants #42614

Merged
merged 14 commits into from
Jul 24, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jun 11, 2024

closes #30412

Based on #30412 (comment), theme.variants is no longer needed.

Using slot variants reduces the API surface, allows developers to customize any slot, and is compatible with Pigment CSS too.

@siriwatknp siriwatknp added package: material-ui Specific to @mui/material v6.x customization: theme Centered around the theming features labels Jun 11, 2024
@mui-bot
Copy link

mui-bot commented Jun 11, 2024

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Left some copy related comments and some questions.

});
```

**Example 2**: Overriding styles based on new values. If your project needs a new Button's variant, use the following snippet:
Copy link
Contributor

Choose a reason for hiding this comment

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

For example, this doesn't feel like an override to me—it's a completely new thing that we're adding to the component's surface area.

Copy link
Member Author

@siriwatknp siriwatknp Jun 17, 2024

Choose a reason for hiding this comment

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

It's hard to justify. Even though it's about adding new value, it's still overriding the default styles of the Button.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Left few comments on the copy writing, the content looks good in general.

@mnajdova mnajdova requested a review from mapache-salvaje July 17, 2024 07:17
Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Left copy-related comments for your consideration.

(Just saw @mnajdova submitted a review so maybe some comments collide, sorry about that)

Co-authored-by: Marija Najdova <[email protected]>
Signed-off-by: Siriwat K <[email protected]>
@siriwatknp siriwatknp dismissed mbrookes’s stale review July 24, 2024 06:09

suggestion applied

@siriwatknp siriwatknp merged commit 20d6774 into mui:next Jul 24, 2024
22 checks passed
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features package: material-ui Specific to @mui/material v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Consolidate component theming into a one API (aka styleOverrides)
6 participants