Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/material-ui/src/styles/muiStyled.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ const variantsResolver = (props, styles, theme, name) => {
const shouldForwardProp = (prop) => prop !== 'styleProps' && prop !== 'theme';

const muiStyled = (tag, options, muiOptions) => {
const defaultStyledResolver = styled(tag, { shouldForwardProp, ...options });
const name = muiOptions.muiName;
const defaultStyledResolver = styled(tag, { shouldForwardProp, label: name, ...options });
Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Owner

Choose a reason for hiding this comment

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

Nicee

Copy link
Author

@oliviertassinari oliviertassinari Sep 21, 2020

Choose a reason for hiding this comment

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

In this context, maybe we don't need to set mui as a prefix, but rely on the default value emotion uses (css).

Copy link
Owner

Choose a reason for hiding this comment

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

Makes sense, will update it

const muiStyledResolver = (...styles) => {
const name = muiOptions.muiName;

if (muiOptions.overridesResolver) {
styles.push((props) => {
const theme = props.theme || defaultTheme;
Expand Down