diff --git a/src/core/Toggle.tsx b/src/core/Toggle.tsx index 5e9ba71a4..39bce1d5d 100644 --- a/src/core/Toggle.tsx +++ b/src/core/Toggle.tsx @@ -4,7 +4,7 @@ import cn from "./utils/cn"; type ToggleProps = { id: string; - size?: string; + size?: "default" | "small"; label?: string; className?: string; } & React.ButtonHTMLAttributes; @@ -18,7 +18,9 @@ const Toggle: React.FC = ({ }) => { const rootSize = size === "small" ? "w-[42px] h-[24px]" : "w-[56px] h-32"; const thumbSize = - size === "small" ? "w-[21px] h-[21px] translate-x-1 data-[state=checked]:translate-x-[20px]" : "h-[28px] w-[28px] translate-x-2 data-[state=checked]:translate-x-[26px]"; + size === "small" + ? "w-[21px] h-[21px] translate-x-1 data-[state=checked]:translate-x-[20px]" + : "h-[28px] w-[28px] translate-x-2 data-[state=checked]:translate-x-[26px]"; return (