UNPKG

626 BTypeScriptView Raw
1import * as React from 'react';
2import { ButtonProps } from './Button';
3export type ToggleButtonType = 'checkbox' | 'radio';
4export interface ToggleButtonProps extends Omit<ButtonProps, 'onChange' | 'type'> {
5 type?: ToggleButtonType;
6 name?: string;
7 checked?: boolean;
8 disabled?: boolean;
9 id: string;
10 onChange?: React.ChangeEventHandler<HTMLInputElement>;
11 value: string | ReadonlyArray<string> | number;
12 inputRef?: React.Ref<HTMLInputElement>;
13}
14declare const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLLabelElement>>;
15export default ToggleButton;