0
owncast/web/.storybook/storybook-theme.js
2023-01-26 17:08:23 -08:00

29 lines
695 B
JavaScript

import React from 'react';
import { DocsContainer as BaseContainer } from '@storybook/addon-docs';
import { themes } from '@storybook/theming';
export const DocsContainer = ({ children, context }) => {
return (
<BaseContainer
context={{
...context,
storyById: id => {
const storyContext = context.storyById(id);
return {
...storyContext,
parameters: {
...storyContext?.parameters,
docs: {
...storyContext?.parameters?.docs,
theme: themes.light,
},
},
};
},
}}
>
{children}
</BaseContainer>
);
};