// @flow
import React from 'react';
import { storiesOf } from '@storybook/react';
import { PercentFormatter } from './index';
import { withDocs } from '../../../.storybook/with-docs';
import docs from './PERCENT-FORMATTER.mkd';

storiesOf('Primitives/PercentFormatter', module).add(
  'normal',
  withDocs(docs)(() => <PercentFormatter value={0.4161} />),
);

storiesOf('Primitives/PercentFormatter', module).add(
  'round to whole',
  withDocs(docs)(() => (
    <PercentFormatter
      value={0.4161}
      minimumFractionDigits={0}
      maximumFractionDigits={0}
    />
  )),
);
