1.0.1 • Published 2 years ago

vue3-tailwind-notifications v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

vue3-notifications

Super simple notification plugin for vue3 with actions styled in tailwindcss.

Install

npm i vue3-tailwind-notifications

// app.js
import {createApp} from 'vue';
import Notify from 'vue3-tailwind-notifications';

const app = createApp({});
app.use(Notify);
app.mount('#app');

// Simple usage
app.$notify('User added.');

// Simple action
app.$notify('User deleted.', {
    action: {
        label: 'Restore user',
        action: () => {
            // Do your thing here. E.g.
            Inertia.post('/users/restore/' + this.user.id);
        }
    }
});