npm install vue-simple-toast --saveImport 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)<simple-toast
:class="type"
:type="type"
:dismissible="true"
:auto-dismiss="false"
iconClass="dashicons dashicons-yes"
message="Options saved."
>
</simple-toast>| Name | Type | Default | Description |
|---|---|---|---|
| autoDismiss | Boolean | false | Should the toast auto-dismiss after 1.7s |
| color | [String, Object] | undefined | If String - background color of the toast. If Object - background color for the toast in multiple types Example: {error: 'red', warning: 'yellow', success : 'green'} |
| dismissible | Boolean | true | If the toast should be dismissible - adds a dismiss button. |
| iconClass | String | undefined | Icon class that will be added on the left of the notice |
| message | String | undefined | Required - the toast message |
| type | String | success |
Can be ['success', 'error', 'warning'] |