Skip to content

Commit

Permalink
docs: fix default storybook theme (#1515)
Browse files Browse the repository at this point in the history
Relates to #764

The class for the default theme is `onyx-theme-default` but we are
currently applying `onyx-theme-onyx` which does not work so the twogo
theme is used as default currently because its the last registered theme

Co-authored-by: Jonathan <[email protected]>
  • Loading branch information
larsrickert and JoCa96 authored Jul 4, 2024
1 parent 109f0af commit 7e12535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sit-onyx/.storybook/theme-switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const currentOnyxTheme = ref<string>();

export const withOnyxTheme: Decorator = (Story, context) => {
watchEffect(() => {
currentOnyxTheme.value = context.globals.onyxTheme;
const theme = context.globals.onyxTheme ?? ONYX_THEMES[0];
currentOnyxTheme.value = theme === ONYX_THEMES[0] ? "default" : theme;
});

return {
Expand Down

0 comments on commit 7e12535

Please sign in to comment.