New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

bee-checkbox

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-checkbox

checkbox ui component for react

1.2.6
Version published
Weekly downloads
94
-54.81%
Maintainers
15
Weekly downloads
 
Created

bee-checkbox

npm version Build Status Coverage Status

复选框

使用

使用单独的bee-checkbox包

组件引入

先进行下载bee-checkbox包

npm install --save bee-checkbox

组件调用

import Checkbox from 'bee-checkbox';

React.render(<div>
        <Checkbox colors="primary" />
</div>, document.getElementById('target'));

样式引入
  • 可以使用link引入dist目录下bee-checkbox.css
<link rel="stylesheet" href="./node_modules/build/bee-checkbox.css">
  • 可以在js中import样式
import "./node_modules/src/Checkbox.scss"
//或是
import "./node_modules/build/bee-checkbox.css"

API

Checkbox

参数说明类型默认值
className类名string-
colorone of: primary success info danger warning darkstring''
disabled是否可用boolfalse
onChange监听改变function-
defaultChecked默认是否选中boolfalse
checked是否选中bool-
indeterminate部分选中bool-
onDoubleClick双击事件functionfunction(checked, event){}
onClick单击事件functionfunction(event){}
value选中的值,需配合CheckboxGroup使用string-

CheckboxGroup

参数说明类型默认值
className类名string-
onChange监听改变function-
value设置默认值array[]
开发调试
$ git clone https://github.com/tinper-bee/bee-checkbox
$ cd bee-checkbox
$ npm install
$ npm run dev

FAQs

Package last updated on 22 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts