simple html notifications for choo. Notifications have fixed positions and a high z-index... Notifications descend down the page and disappear after a specific timeout.
In your main file...
app.use(require('choo-notifications'))
Within views...
<div id="example-view">
${state.render_notifications()}
</div>
Trigger a notification from anywhere!
emit('notification', 'hello world!', 'orange')
The notification message.
Must be a tachyon colour (String)... eg.
- red
- green
- orange
A timeout in seconds before the notification disappears.
Check out the example application /example
...
cd ./example
npm i
npm run build
npm start
Then visit localhost:8000
(needs python)
npm i choo-notifications --save