DefinitelyTyped/types/react-toggle/index.d.ts
2017-03-24 14:27:52 -07:00

21 lines
606 B
TypeScript

// Type definitions for react-toggle 2.2
// Project: https://github.com/aaronshaf/react-toggle
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
import { Component, HTMLAttributes, ReactNode } from "react";
interface ToggleIcons {
checked?: ReactNode;
unchecked?: ReactNode;
}
interface ToggleProps extends HTMLAttributes<any> {
"aria-labelledby"?: string;
"aria-label"?: string;
icons?: boolean | ToggleIcons;
}
export default class Toggle extends Component<ToggleProps, any> {}