Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Message component for Vue Bulma
https://github.com/vue-bulma/message

Last synced: about 2 months ago
JSON representation

Message component for Vue Bulma

Awesome Lists containing this project

README

        

# Message

Message component for Vue Bulma.

## Installation

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

## Examples

```vue



Normal
Primary
Info
Success
Warning
Danger

import Vue from 'vue'
import Message from 'vue-bulma-message'

const MessageComponent = Vue.extend(Message)

const openMessage = (propsData = {
title: '',
message: '',
type: '',
direction: '',
duration: 1500,
container: '.messages'
}) => {
return new MessageComponent({
el: document.createElement('div'),
propsData
})
}

export default {
components: {
Message
},

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

methods: {
openMessageWithType (type) {
openMessage({
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)