aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Switch.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx
index 11a3fe0..10904e1 100644
--- a/src/components/Switch.tsx
+++ b/src/components/Switch.tsx
@@ -18,6 +18,7 @@
import "./Switch.css";
+import { classes } from "@utils/misc";
import { findByPropsLazy } from "@webpack";
interface SwitchProps {
@@ -33,7 +34,7 @@ const SwitchClasses = findByPropsLazy("slider", "input", "container");
export function Switch({ checked, onChange, disabled }: SwitchProps) {
return (
<div>
- <div className={`${SwitchClasses.container} default-colors`} style={{
+ <div className={classes(SwitchClasses.container, "default-colors", checked ? SwitchClasses.checked : void 0)} style={{
backgroundColor: checked ? SWITCH_ON : SWITCH_OFF,
opacity: disabled ? 0.3 : 1
}}>