Ecosyste.ms: Awesome

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

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

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

Last synced: 24 days ago
JSON representation

Notification component for Vue Bulma

Lists

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)