lion/packages/input-iban/stories/index.stories.js
Thomas Allmer ec8da8f12c feat: release inital public lion version
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>
2019-04-26 10:37:57 +02:00

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>
`,
);