0.1.6 • Published 3 years ago

bxb-notification v0.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

bxb-notification

Vue.js component notification from BixBite.

Installation

Download library or can be installed as npm package:

npm i bxb-notification --save-dev

Getting started

To start using bxb-notification, you need to do is plugin installation. Somewhere in your main app.js file:

// Import components to Vue application as plugins.
import Notification from 'bxb-notification';

// Install plugins to Vue application.
Vue.use(Notification);

// Create a fresh Vue application instance and attach it to the page.
const app = new Vue({
    el: '#app'
});

// Make some vue plugins methods to global.
window.Notification = app.$notification;

Usage and API

Methods for calling show messages:

Notification.show(options);
Notification.info(options);
Notification.success(options);
Notification.warning(options);
Notification.error(options);

Example 1

<button class="btn btn-primary" @click="$notification.success({
    title: 'Remember!',
    message: 'This is simple notify message.<hr>Nice!'
})">Notify me!</button>

Example 2

<script>
    Notification.show({
        title: 'Example!',
        message: 'Message from javascript.',
        type: 'warning'
    });
</script>

Лицензия

bxb-notification - программное обеспечение с открытым исходным кодом, распространяющееся по лицензии MIT license.

0.1.6

3 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago