Skip to content

Commit 3e0b941

Browse files
committed
fix(input-amount): add demo how to show no fractions
1 parent bf474fb commit 3e0b941

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/input-amount/stories/index.stories.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,23 @@ storiesOf('Forms|Input Amount', module)
6767
>
6868
</lion-input-amount>
6969
`,
70+
)
71+
.add(
72+
'Show no fractions',
73+
() => html`
74+
<lion-input-amount
75+
label="Amount"
76+
help-text="Prefilled and formatted"
77+
.formatOptions=${{
78+
minimumFractionDigits: 0,
79+
maximumFractionDigits: 0,
80+
}}
81+
.modelValue=${20}
82+
>
83+
</lion-input-amount>
84+
<p>
85+
Make sure to set the modelValue last as otherwise formatOptions will not be taken into
86+
account
87+
</p>
88+
`,
7089
);

0 commit comments

Comments
 (0)