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
[Skeleton] Add rounded
variant
#33044
Conversation
65d94aa
to
6ca11b9
Compare
5ed805a
to
2786bec
Compare
2786bec
to
ef29835
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not obvious to me is why we need this change. It seems that we could either change the Material UI default look & feel or ask developers to apply a theme customization when their designer wants to diverge from the default look.
@@ -37,7 +37,7 @@ For instance: | |||
|
|||
## Variants | |||
|
|||
The component supports 3 shape variants. | |||
The component supports 4 shape variants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds off. Aren't we mixing aesthetic considerations with the kind of component that the skeleton is meant to replace? I would expect 2 different props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we mixing aesthetic considerations with the kind of component that the skeleton is meant to replace?
I'm not sure this is related to the change because we already have similar variants like the circle that does the same thing.
I would expect 2 different props.
I didn't follow you, which two props do you expect? 🤔
I do not really agree with that, this changes is not diverging from the default look to me. This This is also why I use |
rounded
variant
rounded
variantrounded
variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soullivaneuh thanks! Please update to latest master, so we can merge it.
@@ -37,7 +37,7 @@ For instance: | |||
|
|||
## Variants | |||
|
|||
The component supports 3 shape variants. | |||
The component supports 4 shape variants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component supports 4 shape variants. | |
The component supports 4 shape variants: | |
- `text`: represents a single line of text (you can change the height via font size). | |
- `circular`, `rectangular`, and `rounded`: provide only a border radius to let you take control of the size of the skeleton. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -7,7 +7,8 @@ export default function Variants() { | |||
<Stack spacing={1}> | |||
<Skeleton variant="text" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Skeleton variant="text" /> | |
<Skeleton variant="text" sx={{ fontSize: '1rem' }} /> |
@@ -1,3 +1,4 @@ | |||
<Skeleton variant="text" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Skeleton variant="text" /> | |
<Skeleton variant="text" sx={{ fontSize: '1rem' }} /> |
@@ -98,6 +98,9 @@ const SkeletonRoot = styled('span', { | |||
...(ownerState.variant === 'circular' && { | |||
borderRadius: '50%', | |||
}), | |||
...(ownerState.variant === 'rounded' && { | |||
borderRadius: theme.shape.borderRadius, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
borderRadius: theme.shape.borderRadius, | |
borderRadius: (theme.vars || theme).shape.borderRadius, |
@soullivaneuh Not sure what's wrong but I could not commit the suggestions or push to your branch. cc @mnajdova |
Hmm interesting, I've just tried and hit the same problem. Let's wait for @soullivaneuh's response. Maybe doing git clean and updating to latest master could fix the issue. |
Looks like @soullivaneuh is not active anymore, so I guess we will need to re-create a new branch with the changes so that we can commit the suggestions. |
Sure, I can take care of it. |
closed in favor of #33687 |
Sorry for the miss, glad to see this finally merge! 👍 |
closes #33043