mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-07 14:46:38 +02:00
Highlight centering sample code
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
code {
|
code {
|
||||||
border-radius: 4px;
|
|
||||||
font-family: 'Source Code Pro', monospace;
|
font-family: 'Source Code Pro', monospace;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import DetailsLayout from '../DetailsLayout';
|
import DetailsLayout from '../DetailsLayout';
|
||||||
import BrowserFrame from '../placeholders/BrowserFrame';
|
import BrowserFrame from '../placeholders/BrowserFrame';
|
||||||
|
import SampleCode from '../SampleCode';
|
||||||
|
|
||||||
const Centering = () => {
|
const Centering = () => {
|
||||||
return (
|
return (
|
||||||
@@ -13,7 +14,19 @@ const Centering = () => {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
source={
|
source={
|
||||||
<div>source</div>
|
<SampleCode
|
||||||
|
lang="html"
|
||||||
|
code={`
|
||||||
|
<div style="
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
">
|
||||||
|
CENTER
|
||||||
|
</div>
|
||||||
|
`}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</DetailsLayout>
|
</DetailsLayout>
|
||||||
|
@@ -6,12 +6,12 @@ const BrowserFrame = ({ content, source }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="br2 ba b--black-20">
|
<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-red" />
|
||||||
<div className="br-100 mr1 w1 h1 bg-gold" />
|
<div className="br-100 mr1 w1 h1 bg-gold" />
|
||||||
<div className="br-100 mr1 w1 h1 bg-red" />
|
<div className="br-100 mr1 w1 h1 bg-red" />
|
||||||
<div className="ml-auto">
|
<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'}
|
{isContentActive ? 'Source' : 'Demo'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user