Skip to content

Commit

Permalink
fix: example
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-auror committed Jul 1, 2024
1 parent 4c72c40 commit 7d0dd74
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions example/src/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,24 @@ ${code}
Wrapped in a custom component with editor options (no minimap)
</h1>
);`;
const Wrapper = (props) => (
<div style={{ background: '#EEE', padding: '10px' }}>{props.children}</div>
);
return (
<Playground
defaultEditorOptions={{minimap: { enabled: false}}}
defaultEditorOptions={{minimap: { enabled: false }}}
WrappingComponent={Wrapper}
code={`
/\* MDX:
import { Playground } from 'storybook-addon-code-editor';
<Playground code="${code}" />
const Wrapper = (props) => (
<div style={{ background: '#EEE', padding: '10px' }}>{props.children}</div>
);
<Playground
defaultEditorOptions={{minimap: { enabled: false }}}
WrappingComponent={Wrapper}
code="${code}"
/>
*/
${code}
`.trim()}
Expand Down

0 comments on commit 7d0dd74

Please sign in to comment.