Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-switch

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-switch

switch ui component for react

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bee-switch

npm version Build Status devDependency Status

react bee-switch component for tinper-bee

使用

使用单独的switch包

组件引入

先进行下载switch包

npm install --save bee-switch

组件调用

import { Switch } from 'bee-switch';
React.render(<div>
            <Switch />
        </div>, document.getElementById('target'));
样式引入
  • 可以使用link引入dist目录下switch.css
<link rel="stylesheet" href="./node_modules/build/bee-switch.css">
  • 可以在js中import样式
import "./node_modules/src/Switch.scss"
//或是
import "./node_modules/build/bee-switch.css"

API

参数说明类型默认值
checked指定当前是否选中Booleanfalse
defaultChecked初始是否选中Booleanfalse
onChangeHandler变化时回调函数,自定义参照demoFunction(checked:Boolean)
checkedChildren选中时的内容ReactNode
unCheckedChildren非选中时的内容ReactNode
size开关大小,可选值:'' smallString''
setup develop environment
$ git clone https://github.com/tinper-bee/bee-switch
$ cd bee-switch
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 03 Nov 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc