2023-05-26 12:25:02 +02:00
|
|
|
<script lang="ts" setup>
|
2023-05-27 12:30:07 +02:00
|
|
|
import { computed } from 'vue';
|
2023-05-27 13:06:58 +02:00
|
|
|
import { useSnackbar } from '@/composables/useSnackbar';
|
2023-05-26 12:25:02 +02:00
|
|
|
|
2023-05-27 12:30:07 +02:00
|
|
|
const { visible, status, message } = useSnackbar();
|
|
|
|
const title = computed(() => (status.value === 'error' ? 'Error' : 'Success'));
|
2023-05-26 12:25:02 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-05-27 12:30:07 +02:00
|
|
|
<v-snackbar v-model="visible" :color="status" vertical>
|
2023-05-26 12:25:02 +02:00
|
|
|
<h6 class="text-h6 mb-1">{{ title }}</h6>
|
|
|
|
<p class="text-body-1">{{ message }}</p>
|
|
|
|
</v-snackbar>
|
|
|
|
</template>
|