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
This commit is contained in:
Manish Kushare 2022-09-16 12:18:10 +05:30 committed by GitHub
parent bfe0fe9cad
commit 59fb778287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;