From 46427ee156bbf7ef28832e41f9f2d5e315c41f37 Mon Sep 17 00:00:00 2001 From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:41:36 -0800 Subject: [PATCH] feat: make radio and checkbox green (#234) --- .../Checker/__snapshots__/index.test.jsx.snap | 2 ++ .../AnswerWidget/components/Checker/index.jsx | 1 + .../components/EditProblemView/index.scss | 17 ++++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/__snapshots__/index.test.jsx.snap b/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/__snapshots__/index.test.jsx.snap index a9692438d..86f530613 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/__snapshots__/index.test.jsx.snap +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/__snapshots__/index.test.jsx.snap @@ -4,6 +4,7 @@ exports[`Checker component with multiple answers 1`] = ` @@ -15,6 +16,7 @@ exports[`Checker component with single answer 1`] = ` diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/index.jsx b/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/index.jsx index 2ac2a4d7a..70813d0f2 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/index.jsx +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/AnswerWidget/components/Checker/index.jsx @@ -15,6 +15,7 @@ const Checker = ({ value={answer.id} onChange={(e) => setAnswer({ correct: e.target.checked })} checked={answer.correct} + isValid={answer.correct} > {answer.id} diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss b/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss index 343a67a19..bd2699f85 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss @@ -2,4 +2,19 @@ .editProblemView-settingsColumn { flex-basis: 320px; } -} \ No newline at end of file +} + +// overrides paragon in order to make checked radio and checkboxes green +$checked-color: '%230D7D4D'; + +.pgn__form-radio-input { + &:checked { + background-image: url("data:image/svg+xml,") + } +} + +.pgn__form-checkbox-input { + &:checked { + background-image: url("data:image/svg+xml,"); + } +}