import React from "react";
import Switch from "../app/components/Switch";
export default {
title: "Forms/Switch",
component: Switch,
parameters: {
layout: "centered",
},
argTypes: {
checked: {
control: "boolean",
description: "Whether the switch is checked (on) or not (off)",
},
state: {
control: "select",
options: ["default", "focus"],
description: "Visual state of the switch",
},
label: {
control: "text",
description: "Label text displayed next to the switch",
},
onChange: {
action: "changed",
description: "Callback fired when the switch is toggled",
},
onFocus: {
action: "focused",
description: "Callback fired when the switch receives focus",
},
onBlur: {
action: "blurred",
description: "Callback fired when the switch loses focus",
},
},
};
const Template = (args) =>