Skip to content

Commit 57cb7ab

Browse files
committed
chore: remove outer wrapper div
1 parent fc0ef96 commit 57cb7ab

File tree

1 file changed

+34
-45
lines changed

1 file changed

+34
-45
lines changed

src/components/CodeExample/CodeExample.js

+34-45
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,45 @@ class CodeExample extends Component {
1313
'&:first-child': {
1414
marginTop: 0,
1515
},
16-
1716
[media.greaterThan('xlarge')]: {
17+
display: 'flex',
18+
flexDirection: 'row',
1819
marginTop: 80,
1920
},
20-
}}>
21-
<div
22-
css={{
23-
[media.greaterThan('xlarge')]: {
24-
display: 'flex',
25-
flexDirection: 'row',
26-
},
27-
28-
[media.lessThan('large')]: {
29-
display: 'block',
30-
},
31-
}}>
32-
{children && (
33-
<div
34-
css={{
35-
flex: '0 0 33%',
36-
37-
[media.lessThan('xlarge')]: {
38-
marginBottom: 20,
39-
},
4021

41-
'& h3': {
42-
color: colors.dark,
43-
maxWidth: '11em',
44-
paddingTop: 0,
45-
},
46-
47-
'& p': {
48-
marginTop: 15,
49-
marginRight: 40,
50-
lineHeight: 1.7,
51-
52-
[media.greaterThan('xlarge')]: {
53-
marginTop: 25,
54-
},
22+
[media.lessThan('large')]: {
23+
display: 'block',
24+
},
25+
}}>
26+
{children && (
27+
<div
28+
css={{
29+
flex: '0 0 33%',
30+
31+
[media.lessThan('xlarge')]: {
32+
marginBottom: 20,
33+
},
34+
35+
'& h3': {
36+
color: colors.dark,
37+
maxWidth: '11em',
38+
paddingTop: 0,
39+
},
40+
41+
'& p': {
42+
marginTop: 15,
43+
marginRight: 40,
44+
lineHeight: 1.7,
45+
46+
[media.greaterThan('xlarge')]: {
47+
marginTop: 25,
5548
},
56-
}}>
57-
{children}
58-
</div>
59-
)}
60-
{loaded ? (
61-
<CodeEditor code={code} />
62-
) : (
63-
<h4>Loading code example...</h4>
64-
)}
65-
</div>
49+
},
50+
}}>
51+
{children}
52+
</div>
53+
)}
54+
{loaded ? <CodeEditor code={code} /> : <h4>Loading code example...</h4>}
6655
</div>
6756
);
6857
}

0 commit comments

Comments
 (0)