import * as React from 'react'
import { Icon, Props } from '.'
import { Meta, Story } from '@storybook/react'
import {
  Title,
  Subtitle,
  Description,
  Primary,
  ArgsTable,
  Stories,
  PRIMARY_STORY,
} from '@storybook/addon-docs'

export default {
  title: 'components/Icon',
  component: Icon,
  parameters: {
    docs: {
      page: () => (
        <>
          <Title />
          <Subtitle />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
          <Stories />
        </>
      ),
    },
  },
} as Meta

const Template: Story<Props> = ({ ...args }) => (
  <Icon
    {...args}
  />
)

export const Default = Template.bind({})
Default.args = {
  name: 'heart',
}
