0.2.0 • Published 6 years ago
react-offline-grayscale v0.2.0
react-offline-grayscale
Make your react app respond when offline.
Install
using npm:
npm install --save react-offline-grayscaleusing yarn:
yarn add react-offline-grayscaleUsage
Root component
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import ReactOffline from 'react-offline-grayscale'
ReactDOM.render(
<ReactOffline>
<App />
</ReactOffline>,
document.getElementById('root'),
)Props
| name | type | required | default | description |
|---|---|---|---|---|
| enableClick | boolean | false | false | decides if clicks are allowed on offline |
| filter | string | false | grayscale | filter to applied on the document |
| barStyle | object | false | style object for offline indication bar | |
| customPageStyle | object | false | style object for document applied on offline | |
| customOfflineText | string | false | You are offline | Text for offline indication |
License
Contributing
Pull Requests are very welcome!
License
MIT © mrinalraj