import { select, withKnobs } from '@storybook/addon-knobs'
import React from 'react'
import { ColorVariants } from '../../style/themeFields'
import { Button } from '.'

export const button = () => (
  <Button
    // @ts-ignore
    variant={select(
      'Variants',
      {
        none: '',
        [ColorVariants.Primary]: ColorVariants.Primary,
        [ColorVariants.Danger]: ColorVariants.Danger,
        [ColorVariants.Success]: ColorVariants.Success,
      },
      'danger',
    )}
  >
    Push Me
  </Button>
)

export default {
  component: Button,
  title: 'Button',
  decorators: [withKnobs],
}
