@achiga/notifications

npm install @achiga/notifications

Usage no npm install needed!

<script type="module">
  import achigaNotifications from 'https://cdn.skypack.dev/@achiga/notifications';
</script>

README

@achiga/notifications

NPM JavaScript Style Guide

Install

npm install @achiga/notifications

Usage

To use this module, pass in a data object for styles and notification data

Styles structure:

{
  button: {
    backgroundColor: '',
    color: ''
  },
  headline: {
    color: ''
  },
  body: {
    color: ''
  },
  icon: {
    fill: ''
  }
}
Additions 1.1.0 - 
  This package now accepts a boolean from the parent to detect if the mouse has left the browser(required)
  Accepts an optional pageUrl param that will trigger a re-render when the route is changed

Example

import AchigaNotifications from '@achiga/notifications'

class Example extends Component {
  render () {
    return (
      <AchigaNotifications cursorLeftPage={bool} pageUrl={pageUrl} data={notificationData} styles={styles} />
    )
  }
}

License

This project is licensed under the terms of the MIT license.