Skip to content

yuehu/notice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notice

A notification message component.

Showcase at http://yuehu.github.io/notice/.

Installation

Install with component(1):

$ component install yuehu/notice

API

var notice = require('notice');

Options

  1. message: notice({message: 'Show a message'})
  2. type: warn or error.
  3. url: A message with this url.
  4. duration: dismiss after the duration, default is 4000ms.
  5. closeEvent: clear the message on the given event. Default is click.

notice(options, cb)

Show & auto dismiss an message.

notice('Show a message');

Notice(options)

Create a notification.

Notice#show()

Show message.

Notice#clear()

Clear message.

Notice#hide()

Alias for Notice#clear().

License

MIT

About

A notification message component.

Resources

Stars

Watchers

Forks

Packages

No packages published