mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Set bg color for toggle only when checked
This commit is contained in:
parent
a98eda9f95
commit
347403edbd
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ export const Toggle = ({readOnly, value, onChange, activeColor, options }) => {
|
|||
className="form-check-input"
|
||||
type="checkbox"
|
||||
checked={on}
|
||||
style={{ backgroundColor: activeColor}}
|
||||
style={ on ? { backgroundColor: activeColor} : {}}
|
||||
onClick={() => {if(!readOnly) toggle()}}
|
||||
/>
|
||||
</label>
|
||||
|
|
|
|||
Loading…
Reference in a new issue