busy-indicator
v0.0.4
Published
testing reusable busy indicator
Downloads
5
Readme
busy-indicator
A test using busy-indicator
🚀 Getting Started
Using npm
:
npm i busy-indicator
✨ Usage
import BusyIndicator, { BusyIndicatorContext } from "busy-indicator";
function DeepChild() {
const { showDisplay, hideDisplay } = useContext(BusyIndicatorContext);
return (
<div>
<button onClick={showDisplay}>Show</button>
<button onClick={hideDisplay}>Hide</button>
</div>
)
}
export default () => {
return (
<BusyIndicator displayStyles={} displayContent={} >
...
<ChildComponent />
</BusyIndicator>
);
};
📌 Props
Prop | Type | Default | Required
--------------------- | -------- | ------------------------- | --------
children
|any|false
|No
displayStyles
|object|{}
|No
displayContent
|(object|string)|loading
|No