Skip to content

Commit 51c2e6d

Browse files
committed
set custom modal styles in full size used in mobile
1 parent db9fd7f commit 51c2e6d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/@chakra-ui/components/Modal.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,23 @@ export const Modal = defineMultiStyleConfig({
4848
},
4949
})
5050
),
51-
sizes: defaultSizes,
51+
sizes: {
52+
...defaultSizes,
53+
full: {
54+
dialog: {
55+
h: "full",
56+
minH: "unset",
57+
maxH: {
58+
base: "calc(100vh - 1rem)",
59+
md: "min(calc(100vh - 2rem), 792px)",
60+
},
61+
maxW: {
62+
base: "calc(100vw - 1rem)",
63+
md: "min(calc(100vw - 2rem), 1000px)",
64+
},
65+
},
66+
},
67+
},
5268

5369
defaultProps: {
5470
...defaultProps,

0 commit comments

Comments
 (0)