https://github.com/lassehaslev/vue-notifier
Notification plugin for vuejs
https://github.com/lassehaslev/vue-notifier
Last synced: 5 months ago
JSON representation
Notification plugin for vuejs
- Host: GitHub
- URL: https://github.com/lassehaslev/vue-notifier
- Owner: LasseHaslev
- Created: 2016-07-13T14:47:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T14:49:00.000Z (about 10 years ago)
- Last Synced: 2025-02-23T18:16:57.884Z (over 1 year ago)
- Language: Vue
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @lassehaslev/vue-notifier
> Notification plugin for vue
## Installation
Run ```npm install @lassehaslev/vue-notifier --save``` in your project folder
## Usage
The notify container watches for all ```notify``` events from children and shows a notification bar at top.
The container can also call ```notify``` on it self.
``` html
Notify me!
Notify with custom message!
Notification types
Primary
Info
Success
Warning
Danger
// The notifier object
import Notifier from '@lassehaslev/vue-notifier';
// This mixin watches for notification events and pass it on to the notifier element
import { NotifierContainerMixin } from '@lassehaslev/vue-notifier';
// This mixin adds notify functions to the element
// { notify, notifyPrimary, notifySuccess, notifyInfo, notifyWarning, notifyDanger }
import { NotifierMixin } from '@lassehaslev/vue-notifier';
export default {
mixins: [ NotifierContainerMixin, NotifierMixin ],
components: {
Notifier,
}
}
```
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
```
For more information see the [docs for vueify](https://github.com/vuejs/vueify).