-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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-infra] Improve demos toolbar #37762
Conversation
Netlify deploy previewhttps://deploy-preview-37762--material-ui.netlify.app/ Bundle size report |
36b3c77
to
ab0f5d4
Compare
{ | ||
display: 'none', | ||
border: `1px solid ${(theme.vars || theme).palette.divider}`, | ||
marginTop: -1, | ||
marginTop: demoOptions.bg === 'inline' ? 8 : -1, |
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 negative margin when the bg is inline is strange, see https://mui.com/x/react-data-grid/#mit-version and https://mui.com/x/react-date-pickers/shortcuts/#customization as two examples.
...(hiddenToolbar && { | ||
paddingTop: theme.spacing(2), | ||
}), |
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 style seem irrelevant
@@ -233,7 +230,7 @@ const DemoRootMaterial = styled('div', { | |||
}), | |||
/* Prepare the background to display an inner elevation. */ | |||
...(bg === true && { | |||
padding: theme.spacing(4), | |||
padding: theme.spacing(3), |
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.
Match Joy UI
@@ -210,7 +210,7 @@ const DemoRootMaterial = styled('div', { | |||
display: 'flex', | |||
justifyContent: 'center', | |||
[theme.breakpoints.up('sm')]: { | |||
borderRadius: '12px 12px 0 0', | |||
borderRadius: hiddenToolbar ? 12 : '12px 12px 0 0', |
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.
Fix border-radius at the footer of https://mui.com/material-ui/react-grid/#interactive
...(hiddenToolbar && { | ||
paddingTop: theme.spacing(1), | ||
}), |
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 style seem irrelevant
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.
Sweet, good one, thanks for the tips left in the comments & for adding all variants in the experiments docs, super useful! Also pushed a minor tweak to the bg: true
demo.
I noticed small bugs with the demo, so I created a playground to debug and fixed a few instances.
Preview: https://deploy-preview-37762--material-ui.netlify.app/experiments/docs/demos/