import * as React from 'react'; import * as PropTypes from 'prop-types'; import { LabelProps as ReakitLabelProps } from 'reakit/ts'; import { Omit } from '../types'; export declare type LocalSwitchProps = { /** Automatically focus on the switch */ autoFocus?: boolean; checked?: boolean; className?: string; /** Is the switch checked by default? */ defaultChecked?: boolean; /** Disables the switch */ disabled?: boolean; /** ID for the switch */ id?: string; /** Makes the switch required and sets aria-invalid to true */ isRequired?: boolean; /** Switch label */ label?: string; name?: string; palette?: string; /** State of the switch. Can be any color in the palette. */ state?: string; switchRef?: React.RefObject; /** Initial value of the switch */ value?: string; /** Function to invoke when focus is lost */ onBlur?: React.FocusEventHandler; /** Function to invoke when switch has changed */ onChange?: React.FormEventHandler; /** Function to invoke when switch is focused */ onFocus?: React.FocusEventHandler; }; export declare type SwitchProps = LocalSwitchProps & Omit; export declare type SwitchComponents = { Formik: React.FunctionComponent; ReduxForm: React.FunctionComponent; }; export declare const Switch: React.FunctionComponent & SwitchComponents; export declare const switchPropTypes: { autoFocus: PropTypes.Requireable; checked: PropTypes.Requireable; className: PropTypes.Requireable; defaultChecked: PropTypes.Requireable; disabled: PropTypes.Requireable; id: PropTypes.Requireable; isRequired: PropTypes.Requireable; label: PropTypes.Requireable; name: PropTypes.Requireable; palette: PropTypes.Requireable; state: PropTypes.Requireable; switchRef: PropTypes.Validator>; value: PropTypes.Requireable; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onChange: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; }; export declare const switchDefaultProps: { autoFocus: boolean; checked: any; className: any; defaultChecked: any; disabled: boolean; id: any; isRequired: boolean; label: any; onBlur: any; onChange: any; onFocus: any; palette: any; name: any; state: any; switchRef: any; value: any; }; declare const C: React.FunctionComponent & SwitchComponents; export default C;