https://github.com/lukeed/preact-offline
A (300b gzip) component to render alerts/messages when offline.
https://github.com/lukeed/preact-offline
Last synced: 11 months ago
JSON representation
A (300b gzip) component to render alerts/messages when offline.
- Host: GitHub
- URL: https://github.com/lukeed/preact-offline
- Owner: lukeed
- License: mit
- Created: 2017-12-08T09:39:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-08T09:41:20.000Z (over 8 years ago)
- Last Synced: 2025-04-24T22:15:07.197Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://jsfiddle.net/lukeed/8at2tg1e/
- Size: 5.86 KB
- Stars: 29
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# preact-offline [](https://www.npmjs.com/package/preact-offline)
> A (300b gzip) component to render alerts/messages when offline.
Check out the [live demo](https://jsfiddle.net/lukeed/8at2tg1e/)!
This module exposes three module definitions:
* **ES Module**: `dist/preact-offline.es.js`
* **CommonJS**: `dist/preact-offline.js`
* **UMD**: `dist/preact-offline.min.js`
If using the UMD bundle, the library is exposed as `preactOffline` globally.
## Install
```
$ npm install --save preact-offline
```
## Usage
```js
import { h } from 'preact';
import Offline from 'preact-offline';
//=>
No connection
Custom Text
//=>
```
## License
MIT © [Luke Edwards](https://lukeed.com)