style: add transition

This commit is contained in:
Fred
2024-04-30 19:02:18 +08:00
parent ecf6cc27d6
commit 15d6ed252f
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ export default function Switch(props: SwitchProps) {
<RadixSwitch.Root
checked={value}
onCheckedChange={onChange}
className={` cursor-pointer flex w-switch h-switch p-0.5 box-content rounded-md ${switchClassName} ${
className={` cursor-pointer flex w-switch h-switch p-0.5 box-content transition-colors duration-300 ease-in-out rounded-md ${switchClassName} ${
value
? "bg-switch-checked justify-end"
: "bg-switch-unchecked justify-start"