diff --git a/src/core/Toggle.tsx b/src/core/Toggle.tsx index 39bce1d5d..e479e2279 100644 --- a/src/core/Toggle.tsx +++ b/src/core/Toggle.tsx @@ -4,21 +4,21 @@ import cn from "./utils/cn"; type ToggleProps = { id: string; - size?: "default" | "small"; + size?: "sm" | "lg"; label?: string; className?: string; } & React.ButtonHTMLAttributes; const Toggle: React.FC = ({ id, - size, + size = "lg", label, className, ...props }) => { - const rootSize = size === "small" ? "w-[42px] h-[24px]" : "w-[56px] h-32"; + const rootSize = size === "sm" ? "w-[42px] h-[24px]" : "w-[56px] h-32"; const thumbSize = - size === "small" + size === "sm" ? "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]"; diff --git a/src/core/Toggle/Toggle.stories.tsx b/src/core/Toggle/Toggle.stories.tsx index 978f98217..4717e8009 100644 --- a/src/core/Toggle/Toggle.stories.tsx +++ b/src/core/Toggle/Toggle.stories.tsx @@ -24,8 +24,3 @@ Disabled.args = { checked: false, disabled: true, }; - -export const Small = Template.bind({}); -Small.args = { - size: "small", -};