Sink/app/components/ui/sonner/Sonner.vue
ccbikai 643df5c6de feat: add vue-sonner styles import
Import required CSS styles for vue-sonner toast component to ensure proper styling and visual consistency of notifications.nr
2025-05-25 20:38:28 +08:00

23 lines
722 B
Vue

<script lang="ts" setup>
import { Toaster as Sonner, type ToasterProps } from 'vue-sonner'
import 'vue-sonner/style.css'
const props = defineProps<ToasterProps>()
</script>
<template>
<Sonner
class="toaster group"
v-bind="props"
:toast-options="{
classes: {
toast: 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
description: 'group-[.toast]:text-muted-foreground',
actionButton:
'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
cancelButton:
'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
},
}"
/>
</template>