diff --git a/src/components/Switch.module.css b/src/components/Switch.module.css index 8433c91..775803e 100644 --- a/src/components/Switch.module.css +++ b/src/components/Switch.module.css @@ -4,7 +4,7 @@ align-items: center; gap: 1em; cursor: pointer; - &[aria-disabled] { + &[disabled] { cursor: not-allowed; } } @@ -31,7 +31,7 @@ transform: translate(calc(var(--spacing) * 10 - 1px), 2px); } } - [aria-disabled] & { + [disabled] & { --disabled-background: oklch( from var(--color-primary-disabled) calc(l * 0.5) calc(c * 0.5) h ); diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx index 73f1d61..2ac3422 100644 --- a/src/components/Switch.tsx +++ b/src/components/Switch.tsx @@ -25,7 +25,7 @@ export function Switch({ checked = false, disabled = false, onChange }: SwitchPr }, [checked]); return ( -
+