0.2.1 • Published 4 years ago

@garney/busy-indicator v0.2.1

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

busy-indicator

Busy indicator that wraps react-loader-spinner

🚀 Getting Started

Using npm:

npm i @garney/busy-indicator

✨ Usage

import { BusyIndicator, setBusyStatus }  from '@garney/busy-indicator';
 
function DeepChild() {
  return (
    <div>
      <button onClick={() => {
            setBusyStatus(true);
        }}>Show</button>
      <button onClick={() => {
          setBusyStatus(false);
        }}>Hide</button>
    </div>
  )
}
 
export default () => {
  return (
    <div className="main-app">
        <DeepChild/>
        <BusyIndicator/>
    </div>
  );
};

📌 Props

PropTypeDefaultRequired
optionsanyfalseNo

✌️ License

MIT