v-notif
v0.1.2
Published
## Installation ``` yarn add v-notif ```
Downloads
16
Readme
V-notif for vue.js 3
Installation
yarn add v-notif
Usage
// main.js
import notif from "v-notif";
import { createApp } from "vue";
import App from "./App.vue";
import "v-notif/style.css";
createApp(App)
.use(notif)
// .use(notif, { component: NotifItem })
.mount("#app");
// App.vue
<template>
<div>
App
<button
@click="
notif.info({
title: 'text',
text: Date.now(),
timeout: 1500
})
"
>
notif
</button>
</div>
<v-notif />
</template>
<script>
import { VNotif, useNotif } from "v-notif";
export default {
components: { VNotif },
setup() {
const notif = useNotif();
return { notif };
}
};
</script>