import React from "react";
import { Meta, Story } from "@storybook/react";
import { AtomToggle, IToggleProps } from "react/atoms/Toggle";

const meta: Meta = {
  title: "React/atoms/Toggle",
  component: AtomToggle,
  argTypes: {},
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateToggle: Story<IToggleProps> = (props) => (
  <AtomToggle {...props} />
);

// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
// https://storybook.js.org/docs/react/workflows/unit-testing
export const Toggle = TemplateToggle.bind({});

Toggle.args = {
  isChecked: false,
  name: "toggle_button",
  disabled: false,
  onToggle: () => {},
  onText: "On",
  offText: "Off",
  size: "xs",
  labelText: "",
};
