1.0.0 • Published 6 years ago

preact-offline v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

preact-offline NPM

A (300b gzip) component to render alerts/messages when offline.

Check out the live demo!

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

import { h } from 'preact';
import Offline from 'preact-offline';

<Offline />
//=> <div>No connection</div>

<Offline id="foo" class="bar">
  <p>Custom Text</p>
</Offline>
//=> <div id="foo" class="bar"><p>Custom Text</p></div>

License

MIT © Luke Edwards

1.0.0

6 years ago