Skip to content

Commit

Permalink
Merge pull request #18808 from youngboy/youngboy-patch-canvas
Browse files Browse the repository at this point in the history
Addon-docs: Fix canvas support expand code for non-story
  • Loading branch information
shilman committed Aug 22, 2022
2 parents 3a8b9fc + 4ea22da commit 457b9f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -196,6 +196,12 @@ Fixed layout requires custom `height` since it can't be determined.
</Story>
</Canvas>

### withSource="open"

<Canvas withSource="open">
<h2>source open</h2>
</Canvas>

## Docs Disable

<Story name="docs disable" parameters={{ docs: { disable: true } }}>
Expand Down
1 change: 1 addition & 0 deletions code/lib/blocks/src/blocks/Canvas.tsx
Expand Up @@ -34,6 +34,7 @@ const getPreviewProps = (
previewProps: {
...props,
withSource: getSourceProps({ code: decodeURI(mdxSource) }, docsContext, sourceContext),
isExpanded: sourceState === SourceState.OPEN,
},
};
}
Expand Down

0 comments on commit 457b9f9

Please sign in to comment.