UNPKG

@navinc/base-react-components

Version:
43 lines (37 loc) 983 B
import React from 'react' import withPropsCombinations from 'react-storybook-addon-props-combinations' import Input from './input.js' import readme from './input.readme.md' export default { title: 'Form Elements/Input', component: Input, parameters: { info: { text: readme }, }, } export const Basic = (args) => <Input {...args} /> Basic.args = { lede: 'Input lede', label: 'Input some text', type: 'text', value: 'I am an input component', helperText: 'example', helperIcon: 'actions/circle-faq', placeholder: 'placeholder', required: false, hasSpaceForErrors: false, isInvalid: false, disabled: false, errors: [], } export const Variations = withPropsCombinations(Input, { label: ['Input some text'], type: ['text'], value: ['I am an input component'], hasSpaceForErrors: [false, true], isInvalid: [false, true], errors: [[], ['An error'], ['One error', 'Two Errors']], }) Variations.parameters = { info: { disable: true }, }