amis-rpc-design/node_modules/rc-switch/lib/index.d.ts

22 lines
959 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import * as React from 'react';
export declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
export declare type SwitchClickEventHandler = SwitchChangeEventHandler;
interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onClick'> {
className?: string;
prefixCls?: string;
disabled?: boolean;
checkedChildren?: React.ReactNode;
unCheckedChildren?: React.ReactNode;
onChange?: SwitchChangeEventHandler;
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
onClick?: SwitchClickEventHandler;
tabIndex?: number;
checked?: boolean;
defaultChecked?: boolean;
loadingIcon?: React.ReactNode;
style?: React.CSSProperties;
title?: string;
}
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
export default Switch;