1.0.4 • Published 5 years ago
@aligov/mobile-c-radio
Install
$ npm install @aligov/mobile-c-radio --save
Usage
import MobileCRadio from '@aligov/mobile-c-radio';
API
Props
| name | type | default | describe |
|---|
| icon | String | 'right' | icon 位置,left,right |
| checked | Bool | false | 选中态,受控状态 |
| defaultChecked | Bool | false | 默认选中态,非受控状态 |
| disabled | Bool | false | 禁用选择 |
| value | String/Number/Bool | / | 给定 radio 选中 value 值 |
Function
| name | param | return | describe |
|---|
| onChange | Func | / | 点选回调函数 |
CSS API
| 名称 | 说明 |
|---|
| container | 组件容器 |
| leftContainer | 组件内部左侧容器 |
| leftIcon | 左侧 icon |
| rightIcon | 右侧 icon |
| textWrap | 中间文本区域容器 |
| textWrap--mainTitle | 文本区域主标题 |
| textWrap__subTitle | 文本区域副标题 |
| textWrap__mainTitle--checked | 主标题选中 |
Example
import { createElement, render } from 'rax';
import DriverUniversal from 'driver-universal';
import MobileCRadio from '@aligov/mobile-c-radio';
render(<MobileCRadio />, document.body, { driver: DriverUniversal });