mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 04:02:15 +01:00
added success and error notifications
This commit is contained in:
22
resources/js/Components/NotificationContainer.vue
Normal file
22
resources/js/Components/NotificationContainer.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div
|
||||
aria-live="assertive"
|
||||
class="pointer-events-none fixed inset-0 flex items-end px-4 py-6 sm:items-end sm:p-6">
|
||||
<div class="flex w-full flex-col items-center space-y-4 sm:items-end">
|
||||
<Notification
|
||||
v-for="notification in notifications"
|
||||
:type="notification.type"
|
||||
:key="notification.uuid"
|
||||
:title="notification.title"
|
||||
:message="notification.message"></Notification>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Notification from '@/Components/Common/Notification/Notification.vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useNotificationsStore } from '@/utils/notification';
|
||||
|
||||
const { notifications } = storeToRefs(useNotificationsStore());
|
||||
</script>
|
||||
Reference in New Issue
Block a user