|
@ -13,56 +13,45 @@ class CodeExample extends Component { |
|
|
'&:first-child': { |
|
|
'&:first-child': { |
|
|
marginTop: 0, |
|
|
marginTop: 0, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
[media.greaterThan('xlarge')]: { |
|
|
[media.greaterThan('xlarge')]: { |
|
|
|
|
|
display: 'flex', |
|
|
|
|
|
flexDirection: 'row', |
|
|
marginTop: 80, |
|
|
marginTop: 80, |
|
|
}, |
|
|
}, |
|
|
}}> |
|
|
|
|
|
<div |
|
|
|
|
|
css={{ |
|
|
|
|
|
[media.greaterThan('xlarge')]: { |
|
|
|
|
|
display: 'flex', |
|
|
|
|
|
flexDirection: 'row', |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
[media.lessThan('large')]: { |
|
|
|
|
|
display: 'block', |
|
|
|
|
|
}, |
|
|
|
|
|
}}> |
|
|
|
|
|
{children && ( |
|
|
|
|
|
<div |
|
|
|
|
|
css={{ |
|
|
|
|
|
flex: '0 0 33%', |
|
|
|
|
|
|
|
|
|
|
|
[media.lessThan('xlarge')]: { |
|
|
|
|
|
marginBottom: 20, |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'& h3': { |
|
|
[media.lessThan('large')]: { |
|
|
color: colors.dark, |
|
|
display: 'block', |
|
|
maxWidth: '11em', |
|
|
}, |
|
|
paddingTop: 0, |
|
|
}}> |
|
|
}, |
|
|
{children && ( |
|
|
|
|
|
<div |
|
|
'& p': { |
|
|
css={{ |
|
|
marginTop: 15, |
|
|
flex: '0 0 33%', |
|
|
marginRight: 40, |
|
|
|
|
|
lineHeight: 1.7, |
|
|
[media.lessThan('xlarge')]: { |
|
|
|
|
|
marginBottom: 20, |
|
|
[media.greaterThan('xlarge')]: { |
|
|
}, |
|
|
marginTop: 25, |
|
|
|
|
|
}, |
|
|
'& h3': { |
|
|
|
|
|
color: colors.dark, |
|
|
|
|
|
maxWidth: '11em', |
|
|
|
|
|
paddingTop: 0, |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'& p': { |
|
|
|
|
|
marginTop: 15, |
|
|
|
|
|
marginRight: 40, |
|
|
|
|
|
lineHeight: 1.7, |
|
|
|
|
|
|
|
|
|
|
|
[media.greaterThan('xlarge')]: { |
|
|
|
|
|
marginTop: 25, |
|
|
}, |
|
|
}, |
|
|
}}> |
|
|
}, |
|
|
{children} |
|
|
}}> |
|
|
</div> |
|
|
{children} |
|
|
)} |
|
|
</div> |
|
|
{loaded ? ( |
|
|
)} |
|
|
<CodeEditor code={code} /> |
|
|
{loaded ? <CodeEditor code={code} /> : <h4>Loading code example...</h4>} |
|
|
) : ( |
|
|
|
|
|
<h4>Loading code example...</h4> |
|
|
|
|
|
)} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|