Skip to content

Instantly share code, notes, and snippets.

@joshferrell
Created February 1, 2019 20:13
Show Gist options
  • Save joshferrell/4d6fef5186a8c28db9adf68fff1247c5 to your computer and use it in GitHub Desktop.
Save joshferrell/4d6fef5186a8c28db9adf68fff1247c5 to your computer and use it in GitHub Desktop.
React Player Controls Typing
declare module "react-player-controls" {
import * as React from 'react';
interface ButtonProps {
onClick: () => void;
isEnabled?: boolean;
className?: string | null;
style?: React.CSSProperties;
children?: JSX.Element | JSX.Element[];
}
export enum Direction {
HORIZONTAL = 'HORIZONTAL',
VERTICAL = 'VERTICAL'
}
interface FormattedTimeProps {
numSeconds?: number;
className?: string | null;
style: React.CSSProperties;
}
interface SliderProps {
direction?: Direction;
isEnabled?: boolean;
onIntent?: () => void;
onIntentStart?: () => void;
onIntentEnd?: () => void;
onChange?: () => void;
onChangeStart?: () => void;
onChangeEnd?: () => void;
children?: JSX.Element | JSX.Element[];
className?: string | null;
style: React.CSSProperties;
overlayZIndex?: number;
}
export namespace PlayerIcon {
export class Pause extends React.Component { }
export class Play extends React.Component { }
export class Previous extends React.Component { }
export class Next extends React.Component { }
export class SoundOn extends React.Component { }
export class SoundOff extends React.Component { }
}
export class Slider extends React.Component<SliderProps> { }
export class FormattedTime extends React.Component<FormattedTimeProps> { }
export class Button extends React.Component<ButtonProps> {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment