Write less code, do more things!

API

~详细的~ 介绍了提供的所有接口, 对应的可配置参数~, 以及可能的使用示例和说明~

Radio

props api
import p from 'prop-types'

export default function (app) {
     app.defaultProps = {
        prefixClassName: 'face-radio',
        themes: '',
        onChange: function (event) {},
        checked: false,
        name: '',
        value: '',
        disabled: false,
        // type: checkbox https://github.com/onface/checkbox.react
        type: 'radio',
        children: null
    }
    app.propTypes = {
        prefixClassName: p.string,
        themes: p.string ,
        onChange: p.func,
        checked: p.bool,
        name: p.string,
        value:  p.oneOfType([
            p.string,
            p.number
        ]),
        disabled: p.bool,
        type: p.string,
        children: p.oneOfType([
            p.element,
            p.string,
            p.number,
            p.node
        ])
    }
}

RadioGroup

props api
import p from 'prop-types'

export default function (app) {
     app.defaultProps = {
        prefixClassName: 'face-radioGroup',
        themes: '',
        onChange: function (event) {},
        name: '',
        value:'',
        children: null ,
        horiz: false ,
        border: true ,
        separate: false ,
        hideicon: true ,
    }
    app.propTypes = {
        prefixClassName: p.string,
        themes: p.string ,
        onChange: p.func,
        name: p.string,
        value: p.oneOfType([
            p.string,
            p.number
        ]),
        children: p.array,
        horiz: p.bool ,
        border: p.bool ,
        separate: p.bool ,
        hideicon: p.bool ,
    }
}
Github
radio.react - 项目源码
相关站点
component-spec - 组件规范
module - 开源项目脚手架
onface.cc - 资源集合