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

import HelperText from './index';
import HelperTextDocs from './HelperText.md';
import HelperTextOptions from './HelperText.knobs.options';

storiesOf('forms|atoms', module).addDecorator(withKnobs({ escapeHTML: false })).add('HelperText', function () {
  var props = {
    inputId: text('inputID', HelperTextOptions.inputId),
    message: text('message', HelperTextOptions.message)
  };
  return React.createElement(HelperText, props);
}, { info: HelperTextDocs });