UNPKG

@navinc/base-react-components

Version:
41 lines (34 loc) 1 kB
import React from 'react' import withPropsCombinations from 'react-storybook-addon-props-combinations' import PasswordInput from './password-input.js' import readme from './password-input.readme.md' export default { title: 'Form Elements/PasswordInput', component: PasswordInput, parameters: { info: { text: readme }, }, } const Template = (args) => <PasswordInput {...args} /> export const Basic = Template.bind({}) Basic.args = { lede: 'PasswordInput lede', label: 'PasswordInput some text', value: 'I am an input component', placeholder: 'placeholder', required: false, isInvalid: false, errors: [], passwordStrengthScore: 3, requiredPasswordStrengthScore: 4, } export const Variations = withPropsCombinations(PasswordInput, { label: ['PasswordInput some text'], type: ['text'], value: ['I am an input component'], isInvalid: [false, true], errors: [[], ['An error'], ['One error', 'Two Errors']], }) Variations.parameters = { info: { disable: true }, }