import React from "react";
import { Meta, Story } from "@storybook/react";
import { AtomCheckbox, ICheckboxProps } from "react/atoms/Checkbox";

const meta: Meta = {
  title: "React/atoms/Checkbox",
  component: AtomCheckbox,
  argTypes: {
    onChange: {
      control: false,
      table: {
        disable: true,
      },
    },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateCheckbox: Story<ICheckboxProps> = (props) => (
  <AtomCheckbox {...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 Checkbox = TemplateCheckbox.bind({});

Checkbox.args = {
  checked: false,
  disabled: false,
};
