1.1.8 • Published 2 years ago
lesca-react-loading v1.1.8
Why use it?
a simple process loading of react component.
look like this.
Live Demo
Installation
npm install lesca-react-loading --save
Usage
As a Node module:
import { useState } from 'react';
import LoadingProcess from 'lesca-react-loading';
const Page = () => {
const [uploading, setUploading] = useState(false);
return (
<div>
{ uploading && (
<LoadingProcess backgroundColor='#00ff66' iconColor='#f60' scale={0.8}>
<span className='inner'>uploading...</span>
</LoadingProcess>
)}
</div>
);
};
Development
Porps
props | description | default |
---|---|---|
position:string | set position of component | 'fixed' |
scale:number | icon scale | 1 |
backgroundColor:string | set background color | 'rgba(0,0,0,.8)' |
iconColor:object | set icon color | '#fff' |
Features
- maintain if necessary