import { text, boolean, select, number } from '@storybook/addon-knobs';

export default {
  hiddenLabel: function hiddenLabel() {
    return boolean('hiddenLabel', false);
  },
  labelText: function labelText() {
    return text('labelText', 'Text Input');
  },
  required: function required() {
    return boolean('required', false);
  },
  id: function id() {
    return text('id', 'text-input');
  },
  name: function name() {
    return text('name', 'text-input');
  },
  type: function type() {
    return select('type', ['text', 'email', 'number'], 'text');
  },
  width: function width() {
    return number('width', 0);
  },
  maxlength: function maxlength() {
    return number('maxlength', 0);
  },
  pattern: function pattern() {
    return text('pattern', '');
  },
  placeholder: function placeholder() {
    return text('placeholder', 'type something');
  },
  errorMsg: function errorMsg() {
    return text('errorMsg', '');
  },
  defaultText: function defaultText() {
    return text('defaultText', 'default text value');
  }
};