import React from "react";
import { Meta, Story } from "@storybook/react";
import { action } from "@storybook/addon-actions";
import { IProps } from "react/atoms/Buttons/ButtonProps";
import { AtomButtonGhost } from "react/atoms/Buttons/Ghost";

const meta: Meta = {
  title: "React/atoms/Button/Ghost",
  component: AtomButtonGhost,
  argTypes: {
    onClick: {
      table: {
        disable: true,
      },
    },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateGhost: Story<IProps> = (props) => <AtomButtonGhost {...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 Ghost = TemplateGhost.bind({});

Ghost.args = {
  disabled: false,
  onClick: action("Event Click"),
  color: "primary",
  text: "Text",
  type: "button",
  width: "144px",
};
