Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/tahq69/vue-notice

VueJs notice component
https://github.com/tahq69/vue-notice

Last synced: about 2 months ago
JSON representation

VueJs notice component

Awesome Lists containing this project

README

        

# crip-vue-notice

A Vue.js project to add global notices on a page. Take a look to [demo page](http://rawgit.com/tahq69/vue-notice/master/index.html)

![Preview](http://rawgit.com/tahq69/vue-notice/master/dist/Capture.PNG)

## Usage

### Install
```bash
> npm i -S crip-vue-notice
```

### Prerequisites

- [Font Awesome](http://fontawesome.io/): Add font awesome css to make ikons in notices visible:

```html

...

```

### Setup
```javascript
import Vue from 'vue'
import CripNotice from 'crip-vue-notice'

// Install component in to Vue instance.
Vue.use(CripNotice)
```

### Display notification
```vue
// App.vue



Normal
Error
Info
Success
Warning

export default {
methods: {
notice (type) {
this.$notice[type]({
title: `Notice of ${type} type`,
description: `Notice of ${type} type was clicked and it popped up!`
})
},
},
}

```

## Build Setup

```bash
# install dependencies and serve with hot reload at localhost:8080
> npm i && npm run dev
```

## Release steps

```bash
> npm run release
```