-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fix-dialog-size): [Dialog] change Dialog
max-width
to to follow…
… design when maxWidth=`xs` BREAKING CHANGE: change Dialog `max-width` to 400px from 444px when maxWidth=`xs`
- Loading branch information
1 parent
e22c82f
commit c92cec7
Showing
3 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
16 changes: 14 additions & 2 deletions
16
packages/juno-core/src/components/Dialog/styles/DialogStyle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
import { css, RcThemedStyled } from '../../../foundation'; | ||
import { css, px, RcThemedStyled } from '../../../foundation'; | ||
import { RcDialogProps } from '../Dialog'; | ||
import { RcDialogClasses, RcDialogMaxWidths } from '../utils'; | ||
|
||
export const DialogStyle: RcThemedStyled<RcDialogProps, any> = (props) => { | ||
const { size } = props; | ||
const { size, theme } = props; | ||
return css` | ||
.${RcDialogClasses.paper} { | ||
max-width: ${RcDialogMaxWidths[size!]}; | ||
} | ||
.${RcDialogClasses.paperWidthXs} { | ||
max-width: ${px(Math.max(theme.breakpoints.values.xs, 400))}; | ||
&.${RcDialogClasses.paperScrollBody} { | ||
${theme.breakpoints.down( | ||
Math.max(theme.breakpoints.values.xs, 400) + 32 * 2, | ||
)} { | ||
max-width: calc(100% - 64px); | ||
} | ||
} | ||
} | ||
`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"latestCommitSHA": "b48d9bc513ec43ad3f702f1e34107a237e9c0443" | ||
"latestCommitSHA": "fe71b4149c61b11b8f84aa77c5b7b08d1a6a64a9" | ||
} |