Skip to content

Commit

Permalink
[Dialog] Fix support of custom breakpoint units
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikram710 committed Apr 16, 2021
1 parent b3c85de commit b1a65cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/material-ui/src/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const DialogPaper = experimentalStyled(
}),
/* Styles applied to the Paper component if `maxWidth="sm"`. */
...(styleProps.maxWidth === 'sm' && {
maxWidth: theme.breakpoints.values.sm,
maxWidth: `${theme.breakpoints.values.sm}${theme.breakpoints.unit}`,
[`&.${dialogClasses.paperScrollBody}`]: {
[theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2)]: {
maxWidth: 'calc(100% - 64px)',
Expand All @@ -168,7 +168,7 @@ const DialogPaper = experimentalStyled(
}),
/* Styles applied to the Paper component if `maxWidth="md"`. */
...(styleProps.maxWidth === 'md' && {
maxWidth: theme.breakpoints.values.md,
maxWidth: `${theme.breakpoints.values.md}${theme.breakpoints.unit}`,
[`&.${dialogClasses.paperScrollBody}`]: {
[theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2)]: {
maxWidth: 'calc(100% - 64px)',
Expand All @@ -177,7 +177,7 @@ const DialogPaper = experimentalStyled(
}),
/* Styles applied to the Paper component if `maxWidth="lg"`. */
...(styleProps.maxWidth === 'lg' && {
maxWidth: theme.breakpoints.values.lg,
maxWidth: `${theme.breakpoints.values.lg}${theme.breakpoints.unit}`,
[`&.${dialogClasses.paperScrollBody}`]: {
[theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2)]: {
maxWidth: 'calc(100% - 64px)',
Expand All @@ -186,7 +186,7 @@ const DialogPaper = experimentalStyled(
}),
/* Styles applied to the Paper component if `maxWidth="xl"`. */
...(styleProps.maxWidth === 'xl' && {
maxWidth: theme.breakpoints.values.xl,
maxWidth: `${theme.breakpoints.values.xl}${theme.breakpoints.unit}`,
[`&.${dialogClasses.paperScrollBody}`]: {
[theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2)]: {
maxWidth: 'calc(100% - 64px)',
Expand Down

0 comments on commit b1a65cf

Please sign in to comment.