import React, { useState } from 'react';
import { storiesOf } from '@storybook/react';

import SearchBar from '../src/SearchBar';

storiesOf('SearchBar', module).add('Primary', () => {
  const [value, setValue] = useState('');
  const args = {
    placeholder: '456 produits caisse',
    value: value,
    setValue: setValue,
  };

  return <SearchBar {...args} />;
});

storiesOf('SearchBar', module).add('Disabled', () => {
  const [value, setValue] = useState('');
  const args = {
    placeholder: '456 produits caisse',
    value: value,
    setValue: setValue,
    disabled: true,
  };

  return <SearchBar {...args} />;
});
