///
import * as React from "react";
interface HTMLAttributesWeak extends React.HTMLAttributes {
defaultValue?: any;
onChange?: any;
}
export interface GroupProps extends HTMLAttributesWeak {
/**
* 样式类名的品牌前缀
*/
prefix?: string;
/**
* 自定义类名
*/
className?: string;
/**
* 自定义内敛样式
*/
style?: React.CSSProperties;
/**
* 整体禁用
*/
disabled?: boolean;
/**
* 可选项列表, 数据项可为 String 或者 Object, 如 `['apple', 'pear', 'orange']` 或者 `[{value: 'apple', label: '苹果',}, {value: 'pear', label: '梨'}, {value: 'orange', label: '橙子'}]`
*/
dataSource?: Array;
/**
* 被选中的值列表
*/
value?: Array;
/**
* 默认被选中的值列表
*/
defaultValue?: Array;
/**
* 通过子元素方式设置内部 checkbox
*/
children?: Array;
/**
* 选中值改变时的事件
*/
onChange?: (value: Array, e: any) => void;
}
export class Group extends React.Component {}
interface HTMLAttributesWeak extends React.HTMLAttributes {
onChange?: any;
}
export interface CheckboxProps extends HTMLAttributesWeak {
/**
* 样式类名的品牌前缀
*/
prefix?: string;
/**
* 自定义类名
*/
className?: string;
/**
* 自定义内敛样式
*/
style?: React.CSSProperties;
/**
* 选中状态
*/
checked?: boolean;
/**
* 默认选中状态
*/
defaultChecked?: boolean;
/**
* 禁用
*/
disabled?: boolean;
/**
* Checkbox 的中间状态,只会影响到 Checkbox 的样式,并不影响其 checked 属性
*/
indeterminate?: boolean;
/**
* Checkbox 的默认中间态,只会影响到 Checkbox 的样式,并不影响其 checked 属性
*/
defaultIndeterminate?: boolean;
/**
* 状态变化时触发的事件
*/
onChange?: (checked: boolean, e: any) => void;
}
export default class Checkbox extends React.Component {
static Group: typeof Group;
}