An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# preact-offline [![NPM](https://img.shields.io/npm/v/preact-offline.svg)](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

//=>

Custom Text


```

## License

MIT © [Luke Edwards](https://lukeed.com)