shineout
Version:
Shein 前端组件库
51 lines (42 loc) • 907 B
TypeScript
import React from 'react'
import {FormItemStandardProps, StandardProps} from '../@types/common'
export interface SwitchProps extends
StandardProps,
Pick<FormItemStandardProps<boolean>, 'defaultValue' | 'value' | 'onChange' | 'name' >{
/**
* checked status,will in control when pass
*
* 当前选中状态,checked 传入时为受控组件
*
* default: none
*/
checked?: boolean;
/**
* content with checked and unchecked
*
* 选中和未选中时的内容
*
* default: none
*/
content?: React.ReactNodeArray;
/**
* disable switch
*
* 是否禁用
*
* default: false
*/
disabled?: boolean;
/**
* size of switch
*
* 开关大小
*
* default: 'default'
*/
size?: 'default' | 'small' | 'large';
}
declare class Switch extends React.Component<SwitchProps, any>{
render(): JSX.Element
}
export default Switch