cycle-humanejs-driver

0.0.1 • Public • Published

humane-js notifications for your Cycle app.

npm install --save cycle-humanejs-driver
<head>
  <link href=https://cdnjs.cloudflare.com/ajax/libs/humane-js/3.2.2/themes/flatty.min.css rel=stylesheet>
</head>
// cycle instantiation
var makeNotificationDriver = require('cycle-humanejs-driver')
 
drivers = {
  DOM: ...,
  HTTP: ...,
  NOTIFICATION: makeNotificationDriver({timeout: 8000 /* settings passed directly to humane-js */ })
}
 
// inside the cycle component
  return {
    DOM: ...,
    HTTP: ...,
    NOTIFICATION: Rx.Observable.from([
      'simple notification',
      ['success notification', 'success'],
      ['error notification', 'error'],
      ['custom notification', {addnCls: 'my-notification-class' /* object passed directly to humane-js */ }]
    ])
  }
 

It requires the flatty theme to work with 'error', 'success' and 'info' shortcuts, but you can use other themes with the custom notification and explicitly setting the class.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    4

Package Sidebar

Install

npm i cycle-humanejs-driver

Weekly Downloads

4

Version

0.0.1

License

MIT

Last publish

Collaborators

  • fiatjaf