1
import * as React from 'react';
2 3
import { createHostComponent } from '@remax/runtime';
3
import { BaseProps } from '../../types/component';
4

5
export interface CheckboxProps extends BaseProps {
6
  name?: string;
7
  /** checkbox标识,选中时触发checkbox-group的 change 事件,并携带 checkbox 的 value 1.0.0  */
8
  value?: string;
9
  /** 是否禁用 1.0.0  */
10
  disabled?: boolean;
11
  /** 当前是否选中,可用来设置默认选中 1.0.0  */
12
  checked?: boolean;
13
  /** (default: #09BB07) checkbox的颜色,同css的color 1.0.0  */
14
  color?: string;
15
}
16

17
/**
18
 * @see https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html
19
 */
20 3
export const Checkbox: React.ComponentType<CheckboxProps> = createHostComponent<CheckboxProps>('checkbox');
21

22 3
Checkbox.defaultProps = {
23
  disabled: false,
24
  checked: false,
25
  color: '#09bb07',
26
};

Read our documentation on viewing source code .

Loading