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

import SortResults from './index';
import SortResultsDocs from './SortResults.md';
import sortResultsOptions from './SortResults.knobs.options';

storiesOf('molecules', module).addDecorator(withKnobs({ escapeHTML: false })).add('SortResults', function () {
  var props = {
    label: text('label', 'Sort by:'),
    sortButtons: object('sortButtons', sortResultsOptions.sortButtons)
  };
  return React.createElement(SortResults, props);
}, { info: SortResultsDocs });