2.0.3 • Published 3 years ago

choo-notifications v2.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

choo-notifications

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.

usage

In your main file...

app.use(require('choo-notifications'))

Within views...

<div id="example-view">
  ${state.render_notifications()}
</div>

Method: emit('notification', message, colour, timeout)

Trigger a notification from anywhere!

emit('notification', 'hello world!', 'orange')

message (type: String)

The notification message.

colour (type: String) (optional)

Must be a tachyon colour (String)... eg.

  • red
  • green
  • orange

timeout (type: Integer) (optional)

A timeout in seconds before the notification disappears.

example

Check out the example application /example...

cd ./example
npm i
npm run build
npm start

Then visit localhost:8000 (needs python)

screenshot

install

npm i choo-notifications --save
2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago