@navinc/base-react-components
Version:
Nav's Pattern Library
20 lines • 1.17 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { storiesOf } from '@storybook/react';
import { boolean, text, array } from '@storybook/addon-knobs';
import withPropsCombinations from 'react-storybook-addon-props-combinations';
import CurrencyInput from './index.js';
import readme from './readme.md';
storiesOf('1. Components | Form Elements', module).add('CurrencyInput', () => (_jsx(CurrencyInput, { lede: text('lede', 'Input lede'), label: text('label', 'Input some text'), type: text('type', 'text'), value: text('value', 'I am an input component'), required: boolean('required', false), hasSpaceForErrors: boolean('hasSpaceForErrors', false), isInvalid: boolean('isInvalid', false), errors: array('errors[]', []) }, void 0)), {
info: { text: readme },
});
storiesOf('2. Misc | Variations', module).add('CurrencyInput', withPropsCombinations(CurrencyInput, {
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']],
}), {
info: { disable: true },
});
//# sourceMappingURL=story.js.map