Scheduling infrastructure for absolutely everyone.
fix: switch bg when default checked (#8129)
Nafees Nazik82ea4e9fb7bb
diff --git a/packages/ui/components/form/switch/Switch.tsx b/packages/ui/components/form/switch/Switch.tsxindex 1b90cf4c8d3..7784d32594c 100644--- a/packages/ui/components/form/switch/Switch.tsx+++ b/packages/ui/components/form/switch/Switch.tsx@@ -37,7 +37,7 @@ const Switch = ()}><PrimitiveSwitch.RootclassName={cx(- props.checked ? "bg-inverted" : "bg-emphasis",+ props.checked || props.defaultChecked ? "bg-inverted" : "bg-emphasis",primitiveProps.disabled && "cursor-not-allowed","focus:ring-brand-default h-5 w-[34px] rounded-full shadow-none",props.className@@ -47,7 +47,7 @@ const Switch = (id={id}className={cx("block h-[14px] w-[14px] rounded-full transition will-change-transform ltr:translate-x-[4px] rtl:-translate-x-[4px] ltr:[&[data-state='checked']]:translate-x-[17px] rtl:[&[data-state='checked']]:-translate-x-[17px]",- props.checked ? "bg-default shadow-inner" : "bg-inverted",+ props.checked || props.defaultChecked ? "bg-default shadow-inner" : "bg-inverted",classNames?.thumb)}/>