🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

bee-loading

Package Overview
Dependencies
Maintainers
17
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-loading

Loading ui component for react

latest
Source
npmnpm
Version
3.0.1
Version published
Weekly downloads
776
31.3%
Maintainers
17
Weekly downloads
 
Created
Source

bee-loading

npm version Build Status Coverage Status

Browser Support

IEChromeFirefoxOperaSafari
IE 11+ ✔Chrome 31.0+ ✔

react bee-loading component for tinper-bee

some description...

使用方法

使用单独的loading包

组件引入

先进行下载bee-loading包

npm install --save bee-loading

组件调用

import Loading from 'bee-loading';


class LoadingDemo extends Component{
constructor(props) {
    super(props);
    this.state = {
      showRotate: false
    }
  }

  handleShow = () => {
        this.setState({
            showRotate: true
        })
        setTimeout(() => {
            this.setState({
                showRotate: false
            })
        }, 5000)

    }

    render() {
     return (
     <div>
     <Button
         colors="primary"
         onClick={this.handleShow}>
         点击显示默认loading
     </Button>
     <Loading
         showBackDrop={true}
         show={this.state.showRotate}
     />
     </div>

     )
    }

}

样式引入

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

API

Loading Props
参数说明类型默认值
loadingType类型(rotate line custom)stringrotate
indicator加载图标,在 loadingType 值为 custom 时有效ReactElement-
size加载大小(lg md sm)stringmd
color颜色(primary success``warning)string''
container渲染到的容器nodebody
showBackDrop是否显示遮罩booleantrue
fullScreen是否全屏显示,或者只传入fullScreen即可booleanfalse
wrapperClassName容器样式string''

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-loading
$ cd bee-loading
$ npm install
$ npm run dev

Keywords

react

FAQs

Package last updated on 04 Jul 2020

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