pj-global-loader
v1.0.10
Published
Here is the one-stop solution to add a global loader into your project to seamlessly run your project with all Axios requests.
Downloads
58
Maintainers
Readme
pj-global-loader
Here is the one-stop solution to add a global loader into your project to seamlessly run your project with all Axios requests.
Table of Contents
Installation
Install pj-global-loader with npm
npm install pj-global-loader
Demo
Usage
- To add pj-global-loader into your project, you can import as it follows:
import { Loader } from 'pj-global-loader';
API Reference
- Use pj-global-loader as below:
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| axios
| axios
| Required. must pass axios as props |
Custom
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| color
| string
| - Pass color
props to change the color of your loader. The color
value must be a string. |
| size
| number
| - Pass size
props to give custom size as you want. The size
value must be a number. |
Example
import { Loader } from 'pj-global-loader';
import axios from 'axios';
function App() {
return <Loader axios={axios} color="green" size={40} />
}
export default App;
Authors
- Prince Javiya