Skip to content
Draft
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
146 changes: 145 additions & 1 deletion CONTEXT.md

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion apps/storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ const withProductionFonts: Decorator = Story => {
return Story();
};

const withStorybookViewMode: Decorator = (Story, context) => {
if (typeof document !== 'undefined') {
if (context.viewMode === 'docs') {
document.body.dataset.storybookViewMode = 'docs';
} else {
delete document.body.dataset.storybookViewMode;
}
}

return Story();
};

const preview: Preview = {
parameters: {
layout: 'fullscreen',
Expand Down Expand Up @@ -93,7 +105,13 @@ const preview: Preview = {
},
},
},
decorators: [withProductionFonts, withTRPC, withQueryClient, withSessionProvider],
decorators: [
withStorybookViewMode,
withProductionFonts,
withTRPC,
withQueryClient,
withSessionProvider,
],
};

export default preview;
31 changes: 30 additions & 1 deletion apps/storybook/.storybook/storybook.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ body,
color: var(--foreground);
}

body[data-storybook-view-mode='docs'] .storybook-org-app-shell {
position: relative;
min-height: 37rem;
}

body[data-storybook-view-mode='docs'] .storybook-org-app-shell-content {
min-height: 0;
}

body[data-storybook-view-mode='docs'] .storybook-org-app-shell [data-slot='sidebar-container'] {
position: absolute;
height: auto;
}

#storybook-docs .sbdocs.sbdocs-wrapper,
#storybook-docs .sbdocs.sbdocs-content {
background: var(--surface-background) !important;
Expand Down Expand Up @@ -64,8 +78,23 @@ body,
color: var(--foreground) !important;
}

#storybook-docs .sbdocs table:not(.docblock-argstable table) {
width: 100%;
table-layout: fixed;
}

#storybook-docs .sbdocs table:not(.docblock-argstable table) th {
width: 33.333%;
vertical-align: bottom;
color: var(--foreground) !important;
}

#storybook-docs .sbdocs table:not(.docblock-argstable table) td {
vertical-align: top;
color: var(--muted-foreground) !important;
}

#storybook-docs .sbdocs a,
#storybook-docs .sbdocs button:not([role='switch']),
#storybook-docs .sbdocs label {
color: var(--muted-foreground) !important;
}
Expand Down
Loading