Skip to content

Commit

Permalink
fix: wrap story with body
Browse files Browse the repository at this point in the history
  • Loading branch information
te6-in committed Nov 27, 2024
1 parent 82954fd commit 0a4e2a6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/stories/components/decorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ export const SeedThemeDecorator: Decorator = (Story, ctx) => {
if (ctx.name === STORY_LIGHT_THEME) {
return (
<html {...DEFAULT_PROPERTIES} data-seed="light-only" data-seed-scale-color="light">
<Story />
<body>
<Story />
</body>
</html>
);
}

if (ctx.name === STORY_DARK_THEME) {
return (
<html {...DEFAULT_PROPERTIES} data-seed="dark-only" data-seed-scale-color="dark">
<Story />
<body>
<Story />
</body>
</html>
);
}
Expand All @@ -59,14 +63,18 @@ export const SeedThemeDecorator: Decorator = (Story, ctx) => {
data-seed-scale-color="light"
style={{ ...DEFAULT_PROPERTIES.style, fontSize: fontScaleMap[fontScale] }}
>
<Story />
<body>
<Story />
</body>
</html>
);
}

return (
<html {...DEFAULT_PROPERTIES} data-seed="light-only" data-seed-scale-color="light">
<Story />
<body>
<Story />
</body>
</html>
);
};

0 comments on commit 0a4e2a6

Please sign in to comment.