@@ -25,6 +25,7 @@ export const DemoComponent = () => {
2525 const [valueField, setValueField] = useState (0 )
2626 const [valueFieldUnitLabel, setValueFieldUnitLabel] = useState (0 )
2727 const [metaSliderValue, setMetaSliderValue] = useState (0 )
28+ const [ticksSnapSliderValue, setTicksSnapSliderValue] = useState (0 )
2829 const [ticksOnlySliderValue, setTicksOnlySliderValue] = useState (0 )
2930 return (
3031 <>
@@ -47,11 +48,11 @@ export const DemoComponent = () => {
4748 />
4849 <SpaceBlock variant = { 16 } />
4950 <SliderField
50- label = " Tick slider field"
51+ label = " Slider field with ticks "
5152 min = { - 10 }
5253 max = { 20 }
53- value = { ticksOnlySliderValue }
54- handleChange = { setTicksOnlySliderValue }
54+ value = { ticksSnapSliderValue }
55+ handleChange = { setTicksSnapSliderValue }
5556 compact = { true }
5657 tickConfig = { {
5758 ticks: [
@@ -60,15 +61,16 @@ export const DemoComponent = () => {
6061 { position: 10 , label: ' 10°' , marker: true },
6162 { position: 20 , label: ' 20°' , marker: true },
6263 ],
63- snap: false ,
6464 }}
6565 />
6666 <SpaceBlock variant = { 16 } />
67- <Slider
67+ <SliderField
68+ label = " Slider field with ticks where `snap` prop set to false"
6869 min = { - 20 }
6970 max = { 20 }
70- value = { metaSliderValue }
71- handleChange = { setMetaSliderValue }
71+ value = { ticksOnlySliderValue }
72+ handleChange = { setTicksOnlySliderValue }
73+ compact = { true }
7274 tickConfig = { {
7375 ticks: [
7476 { position: - 20 , label: ' -20°' , marker: true },
@@ -77,7 +79,7 @@ export const DemoComponent = () => {
7779 { position: 10 , label: ' 10°' , marker: true },
7880 { position: 20 , label: ' 20°' , marker: true },
7981 ],
80- snap: true ,
82+ snap: false ,
8183 }}
8284 />
8385 </>
0 commit comments