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
  • Loading branch information
yannbf authored Apr 19, 2024
2 parents 67a2111 + bedeb9a commit 979227d
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 979227d

Please sign in to comment.