react-internet-status

1.2.2 • Public • Published

react-internet-status

CircleCI codecov Package Quality downloads

  • 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

InternetStatus png

  • 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

Package Sidebar

Install

npm i react-internet-status

Weekly Downloads

5

Version

1.2.2

License

ISC

Unpacked Size

18.9 kB

Total Files

5

Last publish

Collaborators

  • obayomi