Git Product home page Git Product logo

bee-loading-state's Introduction

bee-loading-state

npm version Build Status Coverage Status

bee-loading-state 组件常用于在按钮上加载状态

安装步骤

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

使用

loading-state依赖于button,使用loading-state还需把button组件down下来

$ npm install bee-loading-state
$ npm run dev

组件引入

先进行下载loading-state包

npm install --save bee-loading-state

组件调用

import LoadingState from 'bee-loading-state';
React.render(<div>
    <div>
        <LoadingState loadingTime="4000" loadingText="loading...">Confirm</LoadingState>
    </div>
</div>, document.getElementById('target'));

样式引入

  • 使用link引入build目录下LoadingState.css
<link rel="stylesheet" href="./node_modules/build/LoadingState.css">
  • 同理,在js中import样式也是LoadingState的样式
import "bee-loading-state/build/LoadingState.css"

使用tinper-bee组件库

(tinper-bee组件库使用方法)[]

API

button的参数在loading-state同样适用,可以使用其他Button组件的props,来设置LoadingState组件中按钮的props。 loading-state扩展的参数如下。

参数 说明 类型 默认值
className 类名 string -
loadingText 自定义loading时显示文字内容 string loading
show 是否显示loading boolean false
showBackDrop 是否显示loading时给button显示遮罩层 boolean true

bee-loading-state's People

Contributors

ahua52 avatar lucian55 avatar boyuzhou avatar jonyshi avatar yangchch6 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.