Skip to content

Commit 44f641a

Browse files
feat: add Notivue for notifications and animations in Nuxt configuration (#26)
1 parent dddb3f8 commit 44f641a

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

app/app.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1+
<script setup lang="ts">
2+
import { darkTheme, lightTheme, Notification, NotificationProgress, Notivue } from 'notivue'
3+
4+
const colorMode = useColorMode()
5+
const theme = computed(() => colorMode.value === 'dark' ? darkTheme : lightTheme)
6+
</script>
7+
18
<template>
9+
<NuxtLoadingIndicator color="#4B5563" />
10+
11+
<Notivue v-slot="item">
12+
<Notification :item="item" :theme="theme">
13+
<NotificationProgress :item="item" />
14+
</Notification>
15+
</Notivue>
16+
217
<NuxtLayout>
318
<NuxtPage />
419
</NuxtLayout>

nuxt.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ export default defineNuxtConfig({
99
'@pinia/nuxt',
1010
'@pinia/colada-nuxt',
1111
'nitro-graphql/nuxt',
12+
'notivue/nuxt',
1213
],
1314
ssr: false,
1415

15-
css: ['~/assets/css/tailwind.css'],
16+
css: [
17+
'~/assets/css/tailwind.css',
18+
'notivue/notification.css',
19+
'notivue/animations.css',
20+
],
1621

1722
nitro: {
1823
modules: ['nitro-graphql'],

0 commit comments

Comments
 (0)