Skip to content

Commit

Permalink
[Slider] Fix typescript typings (#12173)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored and oliviertassinari committed Jul 18, 2018
1 parent 6b4942b commit 9169026
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/material-ui-lab/src/Slider/Slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { ButtonProps } from '@material-ui/core/Button';
import { TransitionProps } from 'react-transition-group/Transition';
import { TransitionHandlerProps } from '@material-ui/core/transitions/transition';

export interface SliderProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
export interface SliderProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, SliderClassKey, 'onChange'> {
disabled?: boolean;
reverse?: boolean;
vertical?: boolean;
Expand All @@ -17,6 +18,21 @@ export interface SliderProps extends StandardProps<React.HTMLAttributes<HTMLDivE
onDragStart?: (event: React.ChangeEvent<{}>) => void;
}

export type SliderClassKey =
| 'root'
| 'container'
| 'track'
| 'trackBefore'
| 'trackAfter'
| 'thumb'
| 'focused'
| 'activated'
| 'disabled'
| 'zero'
| 'vertical'
| 'reverse'
| 'jumped';

declare const Slider: React.ComponentType<SliderProps>;

export default Slider;

0 comments on commit 9169026

Please sign in to comment.