Skip to content

Instantly share code, notes, and snippets.

@srph
Created September 29, 2019 12:02
Show Gist options
  • Save srph/7b0e701c7742b0a353b29c9f87aa2815 to your computer and use it in GitHub Desktop.
Save srph/7b0e701c7742b0a353b29c9f87aa2815 to your computer and use it in GitHub Desktop.
react-input-slider: TypeScript definition
declare module 'react-input-slider' {
export interface SliderValue {
x: number
y: number
}
export interface SliderProps {
axis?: 'x' | 'y' | 'xy'
x?: number
y?: number
xmin?: number
xmax?: number
ymin?: number
ymax?: number
xstep?: number
ystep?: number
styles?: {}
onClick?: (evt: React.ClickEvent<HTMLElement>) => void
onChange?: (SliderValue) => void
onDragEnd?: () => void
}
declare class Slider extends React.Component<SliderProps, any> {}
export default Slider
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment