owncast/web/.storybook/storybook-theme.js

29 lines
695 B
JavaScript
Raw Normal View History

2022-05-18 00:23:52 +03:00
import React from 'react';
2022-06-22 03:28:12 +03:00
import { DocsContainer as BaseContainer } from '@storybook/addon-docs';
2022-05-18 00:23:52 +03:00
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,
2022-05-18 00:23:52 +03:00
},
},
};
},
}}
>
{children}
</BaseContainer>
);
};