UNPKG

@aliretail/react-materials-components

Version:
77 lines (76 loc) 1.92 kB
import React from 'react'; declare type TitleText = { title: string; subTitle: string; }; interface IHandleChange { (value: boolean): void; } declare type TProps = typeof ToggleStatus.defaultProps & { /** * 属性注释 * @default "0" * "0"禁用 * "1"启用 */ value: boolean; text: string; onChange?: IHandleChange; disabled?: boolean; overlayProps?: any; checkedChildren?: string; unCheckedChildren?: string; checkedConfirmProps?: TitleText; unCheckedConfirmProps?: TitleText; }; interface IHandleFn { (): void; } declare type TPopoverProps = { title?: string; subTitle?: string; onOk?: IHandleFn; onCancel?: IHandleFn; }; declare type TState = { /** * 状态注释 * @default 52 */ width: number; statusText: ''; }; declare class ToggleStatus extends React.Component<TProps, TState> { static propTypes: { value: any; text: any; onChange: any; disabled: any; overlayProps: any; checkedChildren: any; unCheckedChildren: any; checkedConfirmProps: any; unCheckedConfirmProps: any; }; static defaultProps: { value: boolean; disabled: boolean; checkedChildren: string; unCheckedChildren: string; }; blankRef: React.RefObject<any>; constructor(props: any); state: TState; static confirmPopover: (params: TPopoverProps) => import("@alifd/next/types/dialog").QuickShowRet; static getDerivedStateFromProps(nextProps: any, prevState: any): { statusText: any; }; componentDidMount(): void; componentDidUpdate(_: any, preState: any): void; getWidth: () => any; changeStatus: (value: any) => void; handleChange: (curVal: any) => void; isEmpty: (obj: any) => boolean; render(): JSX.Element; } export default ToggleStatus;