Skip to content

Commit ed09fd7

Browse files
committed
update modal styles and scroll behavior
1 parent 58c477d commit ed09fd7

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Modal = defineMultiStyleConfig({
1818
dialog: {
1919
bg: "background.base",
2020
gap: "4",
21-
padding: "8",
21+
padding: { base: "4", sm: "8", md: "16" },
2222
borderRadius: "base",
2323
boxShadow: "none",
2424
},
@@ -32,6 +32,7 @@ export const Modal = defineMultiStyleConfig({
3232
closeButton: {
3333
position: "static",
3434
color: "body.base",
35+
bg: "background.base",
3536
},
3637
body: {
3738
padding: "0",
@@ -50,15 +51,13 @@ export const Modal = defineMultiStyleConfig({
5051
...defaultSizes,
5152
full: {
5253
dialog: {
53-
h: "full",
54-
minH: "unset",
55-
maxH: {
54+
minH: {
5655
base: "calc(100vh - 1rem)",
57-
md: "min(calc(100vh - 2rem), 792px)",
56+
md: "min(calc(100vh - 1rem), 792px)",
5857
},
5958
maxW: {
6059
base: "calc(100vw - 1rem)",
61-
md: "min(calc(100vw - 2rem), 1000px)",
60+
md: "min(calc(100vw - 1rem), 1000px)",
6261
},
6362
},
6463
},

src/components/Quiz/QuizWidget/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const QuizWidget = ({
103103

104104
const getMainContainerBg = (): StackProps["bg"] => {
105105
if (!answerStatus) {
106-
return "background.base"
106+
return isStandaloneQuiz ? "background.highlight" : "background.base"
107107
}
108108

109109
if (answerStatus === "correct") {

src/components/Quiz/QuizzesModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const QuizzesModal = ({
3636
contentProps={{ bg: getStatusColor() }}
3737
{...props}
3838
>
39-
<Center m={0} bg={getStatusColor()} py="16">
39+
<Center m={0} bg={getStatusColor()}>
4040
{children}
4141
</Center>
4242
</Modal>

src/components/Simulator/SimulatorModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const SimulatorModal = ({
2727
onClose={onClose}
2828
isCentered
2929
size="full"
30-
scrollBehavior="inside"
30+
scrollBehavior="outside"
3131
contentProps={restProps}
3232
>
3333
{children}

src/components/Simulator/Template.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { Flex, type FlexProps } from "@chakra-ui/react"
33

44
export const Template = (props: FlexProps) => (
55
<Flex
6-
pt={{ base: 0, md: 8 }}
7-
px={{ base: 0, md: 16 }}
86
w="full"
97
justify="center"
108
direction={{ base: "column", md: "row" }}

0 commit comments

Comments
 (0)