UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

26 lines (25 loc) 785 B
import { Component, ReactNode } from 'react'; import { Size } from '../_util/enum'; import ConfigContext, { ConfigContextValue } from '../config-provider/ConfigContext'; export interface SwitchProps { prefixCls?: string; size?: Size; className?: string; checked?: boolean; defaultChecked?: boolean; onChange?: (checked: boolean) => any; checkedChildren?: ReactNode; unCheckedChildren?: ReactNode; disabled?: boolean; loading?: boolean; } export default class Switch extends Component<SwitchProps, {}> { static get contextType(): typeof ConfigContext; static displayName: string; context: ConfigContextValue; private rcSwitch; focus(): void; blur(): void; saveSwitch: (node: any) => void; render(): JSX.Element; }