From 59fb778287d040413af4244bbbaf91cea8a6dbc7 Mon Sep 17 00:00:00 2001 From: Manish Kushare Date: Fri, 16 Sep 2022 12:18:10 +0530 Subject: [PATCH] Bug fixed :[ Checkbox widget ] label is not consistent with the dark theme (#3903) * Bug fixed : label is not consistent with the dark theme * removed console statement --- frontend/src/Editor/Components/Checkbox.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Editor/Components/Checkbox.jsx b/frontend/src/Editor/Components/Checkbox.jsx index bb3c55c7e1..491de91bd7 100644 --- a/frontend/src/Editor/Components/Checkbox.jsx +++ b/frontend/src/Editor/Components/Checkbox.jsx @@ -7,12 +7,14 @@ export const Checkbox = function Checkbox({ fireEvent, setExposedVariable, registerAction, + darkMode, }) { const defaultValueFromProperties = properties.defaultValue ?? false; const [defaultValue, setDefaultvalue] = React.useState(defaultValueFromProperties); const [checked, setChecked] = React.useState(defaultValueFromProperties); const { label } = properties; - const { visibility, disabledState, checkboxColor, textColor } = styles; + const { visibility, disabledState, checkboxColor } = styles; + const textColor = darkMode && styles.textColor === '#000' ? '#fff' : styles.textColor; function toggleValue(e) { const isChecked = e.target.checked;