Mystical-Notification
Working Plunker
https://embed.plnkr.co/mp4hehLvOFLat3tLwN5j/
What is it?
Fully customizable alert notifications. Current types are alert and confirm. Two positions for now are top and bottom.
Sample Desktop | Sample Mobile |
---|---|
Installation
npm install mystical-notification
Usage
If not using a module system you can get the dist file from unpkg CDN here: https://unpkg.com/mystical-notification@01.0.0
and just add the script tag to your html page to have the mystical
lib exposed. If you're using modules then it's best to use npm install mystical-notification
and then import (see TS sample below).
JS
mysticalMystical;
TS
public showInfoMsg public showWarningMsg public makeUserChoose
Public Methods
info(template: string)
- shows a blue colored info note. Will hide after 3 seconds and no backdrop shown.success(template: string)
- shows a green colored success note. Will hide after 3 seconds and no backdrop shown.warning(template: string)
- shows a red colored warning note. Has a backdrop and requires user action to dismiss.alert(options: AlertOptions)
- shows simple alert notificationconfirm(options: ConfirmOptions)
- shows a confirmation notification that requires user interaction to dismiss the note by clicking the backdrop or the positive/negative buttons. Only clicking the positive button returnstrue
Options Interfaces
Contributing
git clone https://github.com/bradmartin/mystical-notification.git
npm install
- install depsnpm run dev
- will transpile and kick off the webpack dev server