import { ComponentType } from 'react' import { StandardProps, CommonEventFunction, FormItemProps } from './common' interface CheckboxProps extends StandardProps { /** ``标识,选中时触发``的 change 事件,并携带 `` 的 value * @supported weapp, rn, tt */ value: string /** 是否禁用 * @supported weapp, h5, rn, tt * @default false */ disabled?: boolean /** 当前是否选中,可用来设置默认选中 * @supported weapp, h5, rn, tt * @default false */ checked?: boolean /** checkbox的颜色,同 css 的 color * @supported weapp, h5, rn, tt */ color?: string /** 选中项发生变化时触发 change 事件,小程序无此 API * @supported h5, rn */ onChange?: CommonEventFunction<{ value: string[] }> /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上 * @supported h5 */ nativeProps?: Record } /** 多选项目 * @classification forms * @supported weapp, h5, rn * @example_react * ```tsx * export default class PageCheckbox extends Component { * state = { * list: [ * { * value: '美国', * text: '美国', * checked: false * }, * { * value: '中国', * text: '中国', * checked: true * }, * { * value: '巴西', * text: '巴西', * checked: false * }, * { * value: '日本', * text: '日本', * checked: false * }, * { * value: '英国', * text: '英国', * checked: false * }, * { * value: '法国', * text: '法国', * checked: false * } * ] * } * render () { * return ( * * * 默认样式 * 选中 * 未选中 * * * 推荐展示样式 * {this.state.list.map((item, i) => { * return ( * * ) * })} * * * ) * } * } * ``` * @example_vue * ```html * * * * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html */ declare const Checkbox: ComponentType export { Checkbox, CheckboxProps }