Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com> Co-authored-by: Thijs Louisse <thijs.louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com> Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
34 lines
835 B
JavaScript
34 lines
835 B
JavaScript
import { storiesOf, html } from '@open-wc/storybook';
|
|
|
|
import { isCountryIBANValidator } from '../src/validators.js';
|
|
import '../lion-input-iban.js';
|
|
|
|
storiesOf('Forms|<lion-input-iban>', module)
|
|
.add(
|
|
'Default',
|
|
() => html`
|
|
<lion-input-iban name="iban"></lion-input-iban>
|
|
`,
|
|
)
|
|
.add(
|
|
'Prefilled',
|
|
() => html`
|
|
<lion-input-iban .modelValue=${'NL20INGB0001234567'} name="iban"></lion-input-iban>
|
|
`,
|
|
)
|
|
.add(
|
|
'Faulty prefilled',
|
|
() => html`
|
|
<lion-input-iban .modelValue=${'NL20INGB0001234567XXXX'} name="iban"></lion-input-iban>
|
|
`,
|
|
)
|
|
.add(
|
|
'Country restrictions',
|
|
() => html`
|
|
<lion-input-iban
|
|
.modelValue=${'DE89370400440532013000'}
|
|
.errorValidators=${[isCountryIBANValidator('NL')]}
|
|
name="iban"
|
|
></lion-input-iban>
|
|
`,
|
|
);
|