UNPKG

@quanxi/ui

Version:

全悉组件库

18 lines (17 loc) 647 B
import "./style.scss"; import React from "react"; export type SwitchChangeEventHandler = (value: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void; export type SwitchClickEventHandler = SwitchChangeEventHandler; export interface SwitchProps { size?: "small" | "medium" | "large"; disabled?: boolean; loading?: boolean; value?: boolean; style?: React.CSSProperties; onChange?: SwitchChangeEventHandler; onClick?: SwitchClickEventHandler; id?: string; [name: string]: unknown; } declare const Switch: (props: SwitchProps) => JSX.Element; export default Switch;