Skip to content

Commit

Permalink
Merge pull request #26883 from storybookjs/justingish/update-vuetify-…
Browse files Browse the repository at this point in the history
…docs

Docs: Improved withVuetifyDecorator example snippet
(cherry picked from commit 979227d)
  • Loading branch information
yannbf authored and storybook-bot committed Apr 19, 2024
1 parent 8073269 commit ab95f6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/addons/themes/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const withVuetifyTheme = ({ themes, defaultTheme }) => {
setup() {
const theme = useTheme();

theme.global.name.value = selected;
theme.global.name.value = themes[selected];

return {
theme,
Expand Down Expand Up @@ -195,12 +195,14 @@ setup((app) => {

export const decorators = [
withVuetifyTheme({
// These keys are the labels that will be displayed in the toolbar theme switcher
// The values must match the theme keys from your VuetifyOptions
themes: {
light: 'light',
dark: 'dark',
customTheme: 'myCustomTheme',
'high contrast': 'highContrast',
},
defaultTheme: 'customTheme', // The key of your default theme
defaultTheme: 'light', // The key of your default theme
}),
];
```

0 comments on commit ab95f6b

Please sign in to comment.