Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
bee-switch
Advanced tools
两种状态切换的开关
先进行下载switch包
npm install --save bee-switch
组件调用
import { Switch } from 'bee-switch';
React.render(<div>
<Switch />
</div>, document.getElementById('target'));
<link rel="stylesheet" href="./node_modules/build/bee-switch.css">
import "./node_modules/src/Switch.scss"
//或是
import "./node_modules/build/bee-switch.css"
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
checked | 指定当前是否选中 | Boolean | false |
defaultChecked | 初始是否选中 | Boolean | false |
onChangeHandler | 变化时回调函数,自定义参照demo | Function(checked:Boolean) | |
checkedChildren | 选中时的内容 | React | Node |
unCheckedChildren | 非选中时的内容 | React | Node |
size | 大小设置,oneOf:primary ,success ,info ,dark ,warning | string | '' |
colors | 颜色设置,oneOf:sm , lg ,'' | string | '' |
$ git clone https://github.com/tinper-bee/bee-switch
$ cd bee-switch
$ npm install
$ npm run dev
FAQs
switch ui component for react
The npm package bee-switch receives a total of 34 weekly downloads. As such, bee-switch popularity was classified as not popular.
We found that bee-switch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.