import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';

import Input from './input';

storiesOf('Input', module)
  .add('Input', () => <Input value="Value" onChange={action('change')} />)
  .add('Input with Placeholder', () => (
    <Input placeholder="Input a value" onChange={action('change')} />
  ))
  .add('Input with Icon', () => (
    <Input icon="search" value="Value" onChange={action('change')} />
  ))
  .add('Input Disabled', () => <Input disabled value="Value" />)
  .add('Input with Error', () => (
    <Input
      value="Error"
      errorMessage="Error message"
      onChange={action('change')}
    />
  ));
