this component base on react-spinkit, but more convenient
must add css-loader and style-loader in webpack config file, you can look this file
npm install --save react-loading-spinkitimport React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Loading from 'react-loading-spinkit';
class App extends Component {
render() {
return (
<div style={{ height: '100vh', width: '100vw' }}>
<Loading show={true} />
</div>
);
}
}
ReactDOM.render(
<App />,
document.querySelector('.app'),
);| Name | Type | Default | Description |
|---|---|---|---|
| className | string | add a custom classname to the outer div | |
| color | string | '#5282ef' | programmatically set the color of the spinners; this can either be a hex value or a color word. |
| fadeIn | string | set the time before the spinner fades in. | |
| height | union: string number |
'100%' | loading overlay's height |
| name | string | specify spinner to use (defaults to line-scale-pulse-out-rapid). | |
| overrideSpinnerClassName | string | change the default sk-spinner className. | |
| show | bool | false | control loading show status |
| width | union: string number |
'100%' | loading overlay's width |
