* chore: Update storybook to v9 * Pin next-export-i18n + remove outdated mock library * Replace old mocking library with MSW * Resolve knip unused code warnings
29 lines
701 B
JavaScript
29 lines
701 B
JavaScript
import React from 'react';
|
|
import { DocsContainer as BaseContainer } from '@storybook/addon-docs/blocks';
|
|
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>
|
|
);
|
|
};
|