cycle-notification-most-driver
v0.0.5
Published
A Cycle.js driver that displays Humane notifications, to be used with most-run
Downloads
4
Maintainers
Readme
This is a driver for all your pure-most Cycle apps (think Motorcycle) displays humane.js notifications.
You don't have to include any CSS for humane.js themes, they will be loaded asynchronously from cdnjs.
Install
npm install --save cycle-notification-most-driver
Use
import most from 'most'
import Cycle from '@cycle/most-run'
import {makeNotificationDriver} from 'cycle-notification-most-driver'
Cycle.run(app, {
NOTIFICATION: makeNotificationDriver({
timeout: 4000,
baseCls: 'humane-bigbox'
})
})
function app () {
return {
NOTIFICATION: most.from([
'normal notification',
['info notification', 'info'],
['error notification with custom opts', 'error', {timeout: 8000}],
['custom', {addnCls: 'custom-class'}],
{text: 'this works too', timeout: 1000, clickToClose: true}
])
}
}