@deegital/vue-trustup-io-toasteo
v1.1.11
Published
Vue package to trigger notification with ease
Downloads
78
Keywords
Readme
vue-trustup-io-toasteo
A vue package to display toast easily
Installation
Install vue-trustup-io-toasteo with yarn
yarn add @deegital/vue-trustup-io-toasteo
Usage/Examples
import { NotificationContainer } from "@deegital/vue-trustup-io-toasteo";
import { useToasteo } from "@deegital/vue-trustup-io-toasteo";
// You may also import style in your css file directly.
import "@deegital/vue-trustup-io-toasteo/dist/style.css";
const toasteo = useToasteo();
const method = () => {
console.log("coucou");
};
<div
@click="toasteo.success({
title: 'titre',
text: 'hello-world',
timer: 5000,
callback: method,
})"
>
Display toast success
</div>
<NotificationContainer :toasteo="toasteo" />
Type
ToastOptions type to help you when you defined the params
export interface ToastOptions {
title?: string;
text?: string;
timer?: number; // default : 5000
callback?: () => void;
showProgressBar?: boolean; // default : true
showUndo?: boolean; // default : true
icon?: string; // default : Relative to called method
}
Development
./cli bootstrap #bootstrap project
./cli yarn install #install dependencies
./cli start #start project
./cli stop #stop project
./cli restart #restart project