import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

import OrderedList from './index';
import OrderedListDocs from './OrderedList.md';
import orderedOptions from './OrderedList.knob.options';

storiesOf('atoms/lists', module).addDecorator(withKnobs({ escapeHTML: false })).add('OrderedList', function () {
  var orderedOptionsWithKnobs = Object.assign.apply(Object, Object.entries(orderedOptions).map(function (_ref) {
    var _ref2;

    var k = _ref[0],
        v = _ref[1];
    return _ref2 = {}, _ref2[k] = v(OrderedList.defaultProps[k]), _ref2;
  }));
  return React.createElement(OrderedList, orderedOptionsWithKnobs);
}, { info: OrderedListDocs });