Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ import { ThemeSwapper, TextLight, TextDark } from "./ThemeSwapper";
const TextThemeDiamondDS = "Theme: DiamondDS";

export const decorators = [
(StoriesWithPadding: React.FC) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(StoriesWithPadding: React.FC, context: any) => {
/* Fixed-position content (for example permanent Drawers) ignores this
wrapper's padding and stays aligned to the viewport, leaving a visible
gap beside padded content.
Full-page layout stories opt out with this flag. */
if (context.parameters.fullBleed === true) {
return <StoriesWithPadding />;
}
return (
<div style={{ padding: "2em" }}>
<StoriesWithPadding />
Expand Down
10 changes: 10 additions & 0 deletions .storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/* Gives the plain story canvas (not the Docs page, which sets its own
fixed height per docs.story.height) a definite height, so a story's
`minHeight: "100%"` resolves against the real viewport instead of
collapsing to its content's height. */
html,
body,
#storybook-root {
height: 100%;
}

:root {
--sb-ds-background: #f6f6f9;
--sb-ds-surface: #ffffff;
Expand Down
Loading
Loading