(props)
| 163 | let stateRef = React.createRef(); |
| 164 | |
| 165 | function RangeExample(props) { |
| 166 | let trackRef = useRef(null); |
| 167 | let input0Ref = useRef(null); |
| 168 | let input1Ref = useRef(null); |
| 169 | let state = useSliderState({...props, numberFormatter}); |
| 170 | stateRef.current = state; |
| 171 | let {trackProps, thumbProps: commonThumbProps} = useSlider(props, state, trackRef); |
| 172 | let {inputProps: input0Props, thumbProps: thumb0Props} = useSliderThumb( |
| 173 | { |
| 174 | ...commonThumbProps, |
| 175 | 'aria-label': 'Min', |
| 176 | index: 0, |
| 177 | trackRef, |
| 178 | inputRef: input0Ref |
| 179 | }, |
| 180 | state |
| 181 | ); |
| 182 | let {inputProps: input1Props, thumbProps: thumb1Props} = useSliderThumb( |
| 183 | { |
| 184 | ...commonThumbProps, |
| 185 | 'aria-label': 'Max', |
| 186 | index: 1, |
| 187 | trackRef, |
| 188 | inputRef: input1Ref |
| 189 | }, |
| 190 | state |
| 191 | ); |
| 192 | return ( |
| 193 | <div> |
| 194 | <div data-testid="track" ref={trackRef} {...trackProps} /> |
| 195 | <div data-testid="thumb0" {...thumb0Props}> |
| 196 | <input ref={input0Ref} {...input0Props} /> |
| 197 | </div> |
| 198 | <div data-testid="thumb1" {...thumb1Props}> |
| 199 | <input ref={input1Ref} {...input1Props} /> |
| 200 | </div> |
| 201 | </div> |
| 202 | ); |
| 203 | } |
| 204 | |
| 205 | describe('using PointerEvents', () => { |
| 206 | installPointerEvent(); |
nothing calls this directly
no test coverage detected