Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vue-bulma/notification

Notification component for Vue Bulma
https://github.com/vue-bulma/notification

Last synced: about 2 months ago
JSON representation

Notification component for Vue Bulma

Awesome Lists containing this project

README

        

# Notification

Notification component for Vue Bulma.

## Installation

```
$ npm install vue-bulma-notification --save
```

## Examples

```vue



Normal
Primary
Info
Success
Warning
Danger

import Vue from 'vue'
import Notification from 'vue-bulma-notification'

const NotificationComponent = Vue.extend(Notification)

const openNotification = (propsData = {
title: '',
message: '',
type: '',
direction: '',
duration: 4500,
container: '.notifications'
}) => {
return new NotificationComponent({
el: document.createElement('div'),
propsData
})
}

export default {
components: {
Notification
},

mounted () {
openNotification({
message: 'Success lorem ipsum dolor sit amet, consectetur adipiscing elit lorem ipsum dolor sit amet, consectetur adipiscing elit',
type: 'success',
duration: 0
})
},

methods: {
openNotificationWithType (type) {
openNotification({
title: 'This is a title',
message: 'This is the message.',
type: type
})
}
}

}

```

## Badges

![](https://img.shields.io/badge/license-MIT-blue.svg)
![](https://img.shields.io/badge/status-stable-green.svg)

---

> [fundon.me](https://fundon.me)  · 
> GitHub [@fundon](https://github.com/fundon)  · 
> Twitter [@_fundon](https://twitter.com/_fundon)