Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
页面内部针对用户行为操作的区域性提醒。根据信息类型不同提供相应的以背景颜色区分的alert。若需背景颜色加深需加dark
类。
使用单独的bee-alert包
先进行下载bee-alert包
npm install --save bee-alert
组件调用
import Alert from 'bee-alert';
React.render(<div>
<Alert />
<Alert colors="info" className="dark" closeLabel="close" />
</div>, document.getElementById('target'));
<link rel="stylesheet" href="./node_modules/build/bee-alert.css">
import "./node_modules/src/Alert.scss"
//或是
import "./node_modules/build/bee-alert.css"
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
className | 类名 | string | |
colors | oneOf:info news success danger warning | string | warning |
controlLabel | 关闭按钮文字 | string | |
onDismiss | 关闭alert触发的方法 | func |
$ git clone https://github.com/tinper-bee/bee-alert
$ cd bee-alert
$ npm install
$ npm run dev
FAQs
alert ui component for react
We found that bee-alert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.