1.0.0 • Published 5 years ago

@z2o/checkbox v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

checkbox

React checkbox component

npm.io npm.io npm.io

Install

$ npm install @z2o/checkbox

Usage

import Checkbox from '@z2o/checkbox'

const c = <Checkbox>default</Checkbox>
React.render(c, container)

Example

online example: https://z2o-react.github.io/checkbox/

API

nametypedefaultdescription
prefixClsstringz2o-checkbox自定义类名前缀
classNamestring-自定义额外类名
styleObject-添加额外样式
checkedBooleanfalse指定当前是否选中
defaultCheckedBooleanfalse初始是否选中
disabledBooleanfalse组件禁用状态
indeterminateBooleanfalse设置 indeterminate 状态,只负责样式控制
sizestringmediumlargesmall
onChange(event) =>-变化时回调函数

License

@z2o/checkbox is released under the MIT license.