Skip to content

Commit 756556b

Browse files
committed
Add a story with minimum set to a negative value
1 parent 1092ac7 commit 756556b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/ui/src/components/range-slider/stories/range-slider.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ export const Disabled = function () {
6464
)
6565
}
6666

67+
export const NegativeMinimum = function () {
68+
const [value, setValue] = useState<string>('0')
69+
function handleInput(event: JSX.TargetedEvent<HTMLInputElement>) {
70+
const newValue = event.currentTarget.value
71+
console.log(newValue)
72+
setValue(newValue)
73+
}
74+
return (
75+
<RangeSlider
76+
increment={10}
77+
maximum={100}
78+
minimum={-100}
79+
onInput={handleInput}
80+
value={value}
81+
/>
82+
)
83+
}
84+
6785
export const CustomIncrement = function () {
6886
const [value, setValue] = useState<string>('50')
6987
function handleInput(event: JSX.TargetedEvent<HTMLInputElement>) {

0 commit comments

Comments
 (0)