import React from 'react';
import { Meta, Story } from '@storybook/react';
import { AtomButtonIcon } from 'react/atoms/Buttons/Icon';
import { action } from '@storybook/addon-actions';
import { IIconButtonProps } from 'react/atoms/Buttons/Icon';

const meta: Meta = {
  title: 'React/atoms/Button/Icon',
  component: AtomButtonIcon,
  argTypes: {
    onClick: {
      table: {
        disable: true
      }
    }
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateButtonIcon: Story<IIconButtonProps> = (props) => (
  <AtomButtonIcon {...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 Icon = TemplateButtonIcon.bind({});

Icon.args = {
  disabled: false,
  onClick: action('Event Click'),
  color: 'primary',
  type: 'button',
  icon: 'beer',
  iconAlign: 'right',
  customColor: 'tertiary',
  shape: 'default'
};
