File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,11 @@ const QuizWidget = ({
96
96
} , [ nextQuiz ] )
97
97
98
98
const getMainContainerBg = ( ) => {
99
- if ( ! answerStatus ) {
100
- return isStandaloneQuiz ? "bg-background-highlight" : "bg-background"
101
- }
102
-
103
- if ( answerStatus === "correct" ) {
104
- return "bg-success-neutral"
105
- }
106
-
107
- return "bg-error-neutral"
99
+ if ( ! isStandaloneQuiz ) return "bg-transparent"
100
+ if ( ! answerStatus ) return "bg-background-highlight"
101
+ if ( answerStatus === "correct" )
102
+ return "!bg-success-light dark:!bg-success-dark"
103
+ return "!bg-error-light dark:!bg-error-dark"
108
104
}
109
105
110
106
return (
Original file line number Diff line number Diff line change @@ -19,15 +19,10 @@ const QuizzesModal = ({
19
19
} : QuizzesModalProps ) => {
20
20
// TODO: remove bang in utility class names when Modal is migrated
21
21
const getStatusColorClass = ( ) => {
22
- if ( quizStatus === "neutral" ) {
23
- return "!bg-background"
24
- }
25
-
26
- if ( quizStatus === "success" ) {
27
- return "!bg-success-neutral"
28
- }
29
-
30
- return "!bg-error"
22
+ if ( quizStatus === "neutral" ) return "!bg-background"
23
+ if ( quizStatus === "success" )
24
+ return "!bg-success-light dark:!bg-success-dark"
25
+ return "!bg-error-light dark:!bg-error-dark"
31
26
}
32
27
33
28
return (
@@ -38,7 +33,7 @@ const QuizzesModal = ({
38
33
contentProps = { { className : getStatusColorClass ( ) } }
39
34
{ ...props }
40
35
>
41
- < Center className = { getStatusColorClass ( ) } > { children } </ Center >
36
+ < Center > { children } </ Center >
42
37
</ Modal >
43
38
)
44
39
}
You can’t perform that action at this time.
0 commit comments