2.0.0 • Published 3 years ago

vue-notif v2.0.0

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

Installation

npm install vue-notif --save

Usage

  • register the component "we use Bulma for styling the notification cards".

    import Vue from 'vue'
    window.EventHub = require('vuemit')
    
    Vue.component('MyNotification', require('vue-notif').default)
  • add the component to your page

    <div class="notif-container">
        <my-notification></my-notification>
    </div>
  • now call it either

    • from html

      <div class="notif-container">
          <my-notification
              title="title"
              body="body"
              type="success/error/primary/warning"
              :icon="false"
              :duration="1/2/etc.."
              :on-close="somefunction()">
          </my-notification>
      </div>
    • or from js

      ```js
      EventHub.fire('showNotif', {
          title: 'title',
          body: 'body',
          type: 'success',
          duration: 1,
          icon: false,
          onClose(){
              // what happen when notification is closed
          }
      });
      ```
      proprequiredtypedefault
      title:x:stringnull
      body:x:stringnull
      type:x:stringinfo
      duration:x:numberin seconds / null "card will remain visible"
      icon:x:booltrue
      onClose:x:functionnull
  • clicking the card itself will dismiss the notification as well.

2.0.0

3 years ago

1.1.10

5 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago