2.0.1 • Published 10 years ago

sb-x-notification v2.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

x-notification

X-Notification is an HTML5 Custom Element derived from the awesome Codrops demo.

For browsers who don't support custom elements natively, You're gonna need to import a polyfill :(

API

class XNotification extends HTMLElement {
  dismiss()
  static create(message: string, options: Object{type: string, autoremove: boolean})
}

Example Usage

Attributes other than message are optional.

<x-notification message="A Message" autoremove="false" type="notice"></x-notification>
const notification = XNotification.create("A Notification")
setTimeout(function(){
  notification.dismiss()
}, 25e2)

License

This project is licensed under the terms of MIT License. See the License file for more info.

2.0.1

10 years ago

2.0.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago