fix(input-amount): add demo how to show no fractions
This commit is contained in:
parent
bf474fb8d5
commit
3e0b941b6a
1 changed files with 19 additions and 0 deletions
|
|
@ -67,4 +67,23 @@ storiesOf('Forms|Input Amount', module)
|
||||||
>
|
>
|
||||||
</lion-input-amount>
|
</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>
|
||||||
|
`,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue