web: fix toggle colors

This commit is contained in:
Abdullah Atta
2023-08-04 16:09:29 +05:00
parent 9936bee8e0
commit ce822e7538
2 changed files with 7 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ function Toggle(props) {
{label}
</Text>
<Switch
sx={{ m: 0, bg: isOn ? "accent" : "icon" }}
sx={{ m: 0, bg: isOn ? "accent" : "icon-secondary" }}
onClick={() => onToggle(!isOn)}
checked={isOn}
/>

View File

@@ -462,7 +462,12 @@ function SettingItem(props: { item: Setting }) {
case "toggle":
return (
<Switch
sx={{ m: 0, background: "accent" }}
sx={{
m: 0,
background: component.isToggled()
? "accent"
: "icon-secondary"
}}
disabled={isWorking}
onChange={() => workWithLoading(component.toggle)}
checked={component.isToggled()}