mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
improve withToolbar logic
This commit is contained in:
parent
653052fc8b
commit
1cd89031ac
@ -17,9 +17,9 @@ export const DocsStory: FC<DocsStoryProps> = ({
|
||||
|
||||
// use withToolbar from parameters or default to true in autodocs
|
||||
const withToolbar =
|
||||
story.parameters.docs?.canvas?.withToolbar === undefined
|
||||
? true
|
||||
: story.parameters.docs.canvas.withToolbar;
|
||||
story.parameters.docs?.canvas?.withToolbar !== undefined
|
||||
? story.parameters.docs.canvas.withToolbar
|
||||
: true;
|
||||
|
||||
return (
|
||||
<Anchor storyId={story.id}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user