Skip to content

Commit 0e42dfa

Browse files
committed
docs(useTheme): fix colors JSDoc to reflect all-themes behavior
Closes #187
1 parent 9d9818e commit 0e42dfa

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

apps/docs/src/pages/composables/plugins/use-theme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Theme selection and computed colors are reactive. Switching themes automatically
124124
| `selectedItem` | <AppSuccessIcon /> | Current theme ticket |
125125
| `selectedValue` | <AppSuccessIcon /> | Current theme colors |
126126
| `selectedIndex` | <AppSuccessIcon /> | Index in registry |
127-
| `colors` | <AppSuccessIcon /> | Resolved colors with aliases |
127+
| `colors` | <AppSuccessIcon /> | Resolved colors for all registered themes (keyed by theme ID) |
128128
| `isDark` | <AppSuccessIcon /> | Current theme is dark |
129129
| `select(id)` || Switch to a specific theme by ID |
130130
| `cycle(ids?)` || Advance to the next theme. Pass an array to restrict which themes to cycle |

packages/0/src/composables/useTheme/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ export interface ThemeContext<
114114
E extends ThemeTicket<Z> = ThemeTicket<Z>,
115115
> extends Omit<SingleContext<Z, E>, 'register'> {
116116
/**
117-
* A computed reference to the resolved colors of the current theme.
117+
* A computed reference to the resolved colors of all registered themes.
118118
*
119-
* @remarks The colors are resolved by replacing any token aliases with their actual values.
119+
* @remarks Returns a record keyed by theme ID. Each value contains the theme's colors
120+
* with any token aliases resolved to their actual values. Lazy themes are excluded
121+
* unless they are currently selected.
120122
*
121123
* @see https://0.vuetifyjs.com/composables/plugins/use-theme
122124
*

0 commit comments

Comments
 (0)