Skip to content

Commit 7d09ea5

Browse files
committed
📝 Add min/max to AmountControl-examples
1 parent 81a380a commit 7d09ea5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

examples/react-chayns-amountcontrol/Example.jsx

+29
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,35 @@ const AmountControlExample = () => {
139139
buttonText="0,10"
140140
showInput={amount > 0}
141141
/>
142+
143+
<br />
144+
145+
<div style={{ display: 'flex', justifyContent: 'space-evenly' }}>
146+
<AmountControl
147+
amount={amount}
148+
onChange={setAmount}
149+
buttonText="min 2"
150+
showInput={amount > 0}
151+
min={2}
152+
/>
153+
154+
<AmountControl
155+
amount={amount}
156+
onChange={setAmount}
157+
buttonText="max 5"
158+
showInput={amount > 0}
159+
max={5}
160+
/>
161+
162+
<AmountControl
163+
amount={amount}
164+
onChange={setAmount}
165+
buttonText="min 2, max 5"
166+
showInput={amount > 0}
167+
min={2}
168+
max={5}
169+
/>
170+
</div>
142171
</div>
143172
);
144173
};

0 commit comments

Comments
 (0)