Open rocketlyz opened 1 year ago
What is the current behavior? I'm confused about the usage of styles prop in useSlider. Code at: https://github.com/streamich/react-use/blob/master/src/useSlider.ts#L16. src/useSlider.ts
src/useSlider.ts
// type declared export interface Options { ... styles: boolean | CSSProperties; }
// only used as a judge
const styles = options.styles === undefined ? true : options.styles; if (ref.current && styles) { ref.current.style.userSelect = 'none'; }
As shown in the above code, could anyone tell me why CSSProperties are used ?
What is the current behavior? I'm confused about the usage of styles prop in useSlider. Code at: https://github.com/streamich/react-use/blob/master/src/useSlider.ts#L16.
src/useSlider.ts
// only used as a judge
As shown in the above code, could anyone tell me why CSSProperties are used ?