-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move naive themeConfig to app.config
- Loading branch information
1 parent
d6ac296
commit 2351b73
Showing
4 changed files
with
532 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default defineAppConfig({ | ||
naiveui: { | ||
themeConfig: { | ||
shared: { | ||
common: { | ||
fontFamily: 'Rubik', | ||
borderRadius: '6px' | ||
} | ||
}, | ||
|
||
light: { | ||
common: { | ||
primaryColor: '#2563eb', // blue[600] | ||
primaryColorHover: '#3b82f6', // blue[500] | ||
primaryColorPressed: '#1d4ed8', // blue[700] | ||
borderColor: '#d1d5db' // gray[300] | ||
}, | ||
Card: { | ||
borderColor: '#d1d5db' // gray[300] | ||
} | ||
}, | ||
|
||
dark: { | ||
common: { | ||
primaryColor: '#3b82f6', // .blue[500] | ||
primaryColorHover: '#60a5fa', // blue[400] | ||
primaryColorPressed: '#4b5563', // blue[600] | ||
borderColor: '#1f2937' // gray[800] | ||
}, | ||
Card: { | ||
borderColor: '#1f2937' // gray[800] | ||
} | ||
} | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,8 @@ | ||
<template> | ||
<NaiveConfig :theme-config="themeConfig"> | ||
<NuxtLoadingIndicator :color="themeConfig.light?.common?.primaryColor" /> | ||
<NaiveConfig> | ||
<NuxtLoadingIndicator color="#2563eb" :height="3" /> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
</NaiveConfig> | ||
</template> | ||
<script setup lang="ts"> | ||
import type { ThemeConfig } from '@bg-dev/nuxt-naiveui' | ||
const themeConfig = ref<ThemeConfig>({ | ||
shared: { | ||
common: { | ||
fontFamily: 'Rubik', | ||
borderRadius: '6px' | ||
} | ||
}, | ||
light: { | ||
common: { | ||
primaryColor: '#2563eb', // blue[600] | ||
primaryColorHover: '#3b82f6', // blue[500] | ||
primaryColorPressed: '#1d4ed8', // blue[700] | ||
borderColor: '#d1d5db' // gray[300] | ||
}, | ||
Card: { | ||
borderColor: '#d1d5db' // gray[300] | ||
} | ||
}, | ||
dark: { | ||
common: { | ||
primaryColor: '#3b82f6', // .blue[500] | ||
primaryColorHover: '#60a5fa', // blue[400] | ||
primaryColorPressed: '#4b5563', // blue[600] | ||
borderColor: '#1f2937' // gray[800] | ||
}, | ||
Card: { | ||
borderColor: '#1f2937' // gray[800] | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
2351b73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nuxt-starter – ./
nuxt-starter-becem-gharbi.vercel.app
nuxt-starter-git-main-becem-gharbi.vercel.app
nuxt-starter.bg.tn