1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-06 06:07:33 +02:00

Highlight centering sample code

This commit is contained in:
Phuoc Nguyen
2019-11-15 16:37:08 +07:00
parent 029755ed64
commit 478297f11a
3 changed files with 16 additions and 4 deletions

View File

@@ -11,7 +11,6 @@
-webkit-font-smoothing: antialiased;
}
code {
border-radius: 4px;
font-family: 'Source Code Pro', monospace;
font-size: 14px;
}

View File

@@ -2,6 +2,7 @@ import React from 'react';
import DetailsLayout from '../DetailsLayout';
import BrowserFrame from '../placeholders/BrowserFrame';
import SampleCode from '../SampleCode';
const Centering = () => {
return (
@@ -13,7 +14,19 @@ const Centering = () => {
</div>
}
source={
<div>source</div>
<SampleCode
lang="html"
code={`
<div style="
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
">
CENTER
</div>
`}
/>
}
/>
</DetailsLayout>

View File

@@ -6,12 +6,12 @@ const BrowserFrame = ({ content, source }) => {
return (
<div className="br2 ba b--black-20">
<div className="flex pa3 bb b--black-20 items-center">
<div className="flex pa3 bb b--black-20 items-center bg-black-05">
<div className="br-100 mr1 w1 h1 bg-red" />
<div className="br-100 mr1 w1 h1 bg-gold" />
<div className="br-100 mr1 w1 h1 bg-red" />
<div className="ml-auto">
<button className="pointer bg-dark-blue br2 ph2 pv1 white" onClick={flip}>
<button className="bn pointer bg-dark-blue br2 ph2 pv1 white" onClick={flip}>
{isContentActive ? 'Source' : 'Demo'}
</button>
</div>