fix(input-amount): add demo how to show no fractions

This commit is contained in:
Thomas Allmer 2019-10-24 14:11:09 +02:00 committed by Thomas Allmer
parent bf474fb8d5
commit 3e0b941b6a

View file

@ -67,4 +67,23 @@ storiesOf('Forms|Input Amount', module)
>
</lion-input-amount>
`,
)
.add(
'Show no fractions',
() => html`
<lion-input-amount
label="Amount"
help-text="Prefilled and formatted"
.formatOptions=${{
minimumFractionDigits: 0,
maximumFractionDigits: 0,
}}
.modelValue=${20}
>
</lion-input-amount>
<p>
Make sure to set the modelValue last as otherwise formatOptions will not be taken into
account
</p>
`,
);