docs(theme): fix config section

This commit is contained in:
Benjamin Canac
2025-03-03 16:46:39 +01:00
parent d76f9c4fe4
commit 4514171a3f

View File

@@ -820,14 +820,14 @@ You can explore the theme for each component in two ways:
- Check the `Theme` section in the documentation of each individual component.
- Browse the source code directly in the GitHub repository at [`v3/src/theme`](https://github.com/nuxt/ui/tree/v3/src/theme).
::
### Config
::framework-only
#nuxt
::div
:::div
You can override the theme of components globally inside your `app.config.ts` by using the exact same structure as the theme object.
Let's say you want to change the font weight of all your buttons, you can do it like this:
@@ -844,17 +844,21 @@ export default defineAppConfig({
})
```
::
:::
#vue
::module-only
#ui
:::div
You can override the theme of components globally inside your `vite.config.ts` by using the exact same structure as the theme object.
Let's say you want to change the font weight of all your buttons, you can do it like this:
::::module-only
#ui
:::::div
```ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
@@ -875,13 +879,12 @@ export default defineConfig({
]
})
```
:::
:::::
#ui-pro
:::div
You can override the theme of components globally inside your `vite.config.ts` by using the exact same structure as the theme object.
Let's say you want to change the font weight of all your buttons, you can do it like this:
:::::div
```ts [vite.config.ts]
import { defineConfig } from 'vite'
@@ -903,8 +906,12 @@ export default defineConfig({
]
})
```
:::::
::::
:::
::
::