react-web-notification

React-web-notification Build Status npm version codebeat badge FOSSA Status codecov

React component with HTML5 Web Notification API. This component show nothing in dom element, but trigger HTML5 Web Notification API with render method in the life cycle of React.js.

Demo

View Demo

Installation

npm install --save react-web-notification

API

Notification

React component which wrap web-notification.

Props

Notification.propTypes = {
  ignore: bool,
  disableActiveWindow: bool,
  askAgain: bool,
  notSupported: func,
  onPermissionGranted: func,
  onPermissionDenied: func,
  onShow: func,
  onClick: func,
  onClose: func,
  onError: func,
  timeout: number,
  title: string.isRequired,
  options: object,
  swRegistration: object,
};

Usage example

See example

yarn
yarn run start:example

Tests

yarn test

Update dependencies

Use npm-check-updates

Known Issues

License

FOSSA Status