react-internet-status
- A small React component that indicates lost internet connectivity
Installation
npm install react-internet-status
Usage
import { InternetStatus } from 'react-internet-status'
function App(){
return (
<div>
<InternetStatus background='green' />
</div>
);
}
export default App
- Render InternetStatus component, wrapped in any component, e.g the App Component as shown above. Then pass in props as need be.
Props
- message: string - Message to user when internet is lost
- background: string - Container background color
- textColor: string - Text color for message string
- width: string - Container width
- height: string - Container height
Author
- Martins Obayomi