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

import { InputIncrement } from '../src';
import { ProgressPlugin } from 'webpack';

export default {
  title: 'InputIncrement',
  component: InputIncrement,
};

const Story = (args) => {
  const [value, setValue] = useState(0);

  return <InputIncrement value={value} setValue={setValue} {...args} />;
};

const Template = (args) => <Story {...args} />;

export const Default = Template.bind({});
Default.args = {};

export const LimitedValues0and5 = Template.bind({});
LimitedValues0and5.args = {
  limitValues: { minValue: 0, maxValue: 5 },
};

export const Disabled = Template.bind({});
Disabled.args = {
  isDisabled: true,
};
