1.0.1 • Published 5 years ago

vue-js-simple-toast v1.0.1

Weekly downloads
12
License
-
Repository
github
Last release
5 years ago

Vue.js simple toast.

Install

npm install vue-simple-toast --save

Import

Import plugin:

import simpleToast from 'vue-js-simple-toast'

Vue.use(simpleToast)

OR

Import component:

import { simpleToast } from 'vue-js-simple-toast'

Vue.component('simpleToast', simpleToast)

Use

<simple-toast  
    :class="type"
    :type="type"
    :dismissible="true"
    :auto-dismiss="false"
    iconClass="dashicons dashicons-yes"
    message="Options saved."
    >
</simple-toast>

Properties

NameTypeDefaultDescription
autoDismissBooleanfalseShould the toast auto-dismiss after 1.7s
colorString, ObjectundefinedIf String - background color of the toast. If Object - background color for the toast in multiple types Example: {error: 'red', warning: 'yellow', success : 'green'}
dismissibleBooleantrueIf the toast should be dismissible - adds a dismiss button.
iconClassStringundefinedIcon class that will be added on the left of the notice
messageStringundefinedRequired - the toast message
typeStringsuccessCan be ['success', 'error', 'warning']