import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { text, button, boolean } from '@storybook/addon-knobs';
import Counter from './component';

const props = ({
  isHidden = undefined,
  children = undefined,
  onClick = undefined,
} = {}) => ({
  isHidden: boolean('isHidden', isHidden),
  children: text('children', children),
  onClick: button('onClick', action('clicked', onClick)),
});

storiesOf('Web|Counter', module)
  .add('Counter', () => (
    <Counter {...props()} />
  ));
