Skip to content

Commit cfa6a91

Browse files
committed
Put examples within the container
It's sometimes hard to scroll past them because if you happen to scroll while your cursor is inside, the example starts scrolling, so it's feels like a trap. Also, the design of CodeSandbox has changed a bit, now it has rounded corners, which visually requires some space around it.
1 parent 6243a0c commit cfa6a91

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

www/src/templates/component.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ class ComponentTemplate extends React.Component {
6161
<div
6262
dangerouslySetInnerHTML={{ __html: extractMarkdown(metadata) }}
6363
/>
64-
</Container>
6564

66-
{codeSandboxId != null && (
67-
<Example
68-
codeSandbox={{
69-
title: `${metadata.displayName} Component`,
70-
id: codeSandboxId,
71-
}}
72-
/>
73-
)}
65+
{codeSandboxId != null && (
66+
<Example
67+
codeSandbox={{
68+
title: `${metadata.displayName} Component`,
69+
id: codeSandboxId,
70+
}}
71+
/>
72+
)}
7473

75-
<Container>
7674
<h2 id={`${metadata.displayName}-props`}>
7775
<a href={`#${metadata.displayName}-props`}>Props</a>
7876
{metadata.composes && (

0 commit comments

Comments
 (0)