-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Make the demos feel more realistic #38212
[Skeleton] Make the demos feel more realistic #38212
Conversation
d6b29b3
to
88c9b7b
Compare
{loading ? 'Stop' : 'Start'} Loading | ||
{loading ? 'Stop' : 'Start'} loading |
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.
Casing convention.
<Box sx={{ display: 'flex', gap: 2 }}> | ||
<Stack spacing={2} useFlexGap> |
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.
More idomatic?
src="https://images.unsplash.com/photo-1686548812883-9d3777f4c137?h=400&fit=crop&auto=format&dpr=2" | ||
src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" |
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.
We are not supposed to have the real data at this point in time.
<Box sx={{ m: 'auto', display: 'flex', alignItems: 'center', gap: 2 }}> | ||
<Skeleton loading={loading} variant="circular" width={48} height={48} /> | ||
<Box> |
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.
Empty boxes like this one looks wrong, I'm expanding the thought on this in mui/mui-x#9831.
<Box sx={{ m: 'auto' }}> | ||
<Avatar src={loading ? '' : '/static/images/avatar/1.jpg'}> | ||
<Skeleton loading={loading} /> | ||
</Avatar> | ||
</Box> | ||
<FormControl | ||
orientation="horizontal" | ||
sx={{ gap: 1, justifyContent: 'center' }} | ||
> | ||
<Avatar src={loading ? '' : '/static/images/avatar/1.jpg'}> | ||
<Skeleton loading={loading} /> | ||
</Avatar> | ||
<FormControl orientation="horizontal" sx={{ gap: 1 }}> | ||
<Switch | ||
size="sm" | ||
checked={loading} |
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.
Simpler preview
88c9b7b
to
df9b497
Compare
Netlify deploy previewhttps://deploy-preview-38212--material-ui.netlify.app/ Bundle size report |
Co-authored-by: zanivan <[email protected]>
A continuation of #37893 (comment). My goal is to make the examples more realistic as well as simpler. It's a quick polish.
Before: https://mui.com/joy-ui/react-skeleton/
After: https://deploy-preview-38212--material-ui.netlify.app/joy-ui/react-skeleton/