import React, { ReactChild } from 'react';
import { IconButton } from '.';
import * as Icons from '../../assets/images/icons';
import { IconButtonProps } from './definitions';

export default {
  title: 'IconButton',
  component: IconButton,
  argTypes: {
    onClick: { action: 'clicked' },
  },
};

const Template = (args) => <IconButton Asset={Icons.SvgPlus} {...args} />;

export const Raw = Template.bind({});

Raw.args = { children: 'Default' } as IconButtonProps & {
  children?: ReactChild;
};

export const Primary = Template.bind({});

Primary.args = { variant: 'primary' } as IconButtonProps & {
  children?: ReactChild;
};
