From 3e92b7f1e04a709df231fce22801b55619e8faab Mon Sep 17 00:00:00 2001
From: Corentin Thomasset <corentin.thomasset74@gmail.com>
Date: Mon, 4 Apr 2022 01:52:59 +0200
Subject: feat(style): dark mode

---
 src/App.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index abbb362..14139b3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,16 +5,21 @@ import { computed } from 'vue';
 import { useRoute } from 'vue-router'
 
 import {
+  darkTheme,
   NConfigProvider,
   NGlobalStyle,
 } from 'naive-ui'
+import { useStyleStore } from './stores/style.store';
 
 const route = useRoute();
 const layout = computed(() => route?.meta?.layout ?? layouts.base)
+const styleStore = useStyleStore()
+
+const theme = computed(() => styleStore.isDarkTheme ? darkTheme : null)
 </script>
 
 <template>
-  <n-config-provider>
+  <n-config-provider :theme="theme">
     <n-global-style />
     <n-message-provider placement="bottom">
       <component :is="layout">
-- 
cgit v1.2.3

