You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
695 B
28 lines
695 B
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> |
|
); |
|
};
|
|
|