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,
|
2023-01-27 04:01:08 +03:00
|
|
|
theme: themes.light,
|
2022-05-18 00:23:52 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</BaseContainer>
|
|
|
|
);
|
|
|
|
};
|