1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-16 02:54:20 +02:00

Rename to typescript extension

This commit is contained in:
Phuoc Nguyen
2019-11-24 23:09:38 +07:00
parent bf35bd3b92
commit 642e179699
104 changed files with 183 additions and 2 deletions

View File

@@ -0,0 +1,85 @@
import React from 'react';
import DetailsLayout from '../../layouts/DetailsLayout';
import Block from '../../placeholders/Block';
import BrowserFrame from '../../placeholders/BrowserFrame';
import Rectangle from '../../placeholders/Rectangle';
const Details = () => {
return (
<DetailsLayout title="Same height columns">
<div className="ph4 pv5">
<BrowserFrame
content={
<div className="h-100 flex flex-column items-center justify-center pa3">
<div className="flex h-100 w-100">
<div className="b--black-20 ba br2 mh2 flex flex-column" style={{ flex: 1 }}>
<Rectangle height={200} />
<div className="pa3" style={{ flex: 1 }}>
<Block numberOfBlocks={10} />
</div>
<div className="pa3 w4">
<Rectangle height={32} />
</div>
</div>
<div className="b--black-20 ba br2 mh2 flex flex-column" style={{ flex: 1 }}>
<Rectangle height={200} />
<div className="pa3" style={{ flex: 1 }}>
<div className="mb3"><Block numberOfBlocks={15} /></div>
<Block numberOfBlocks={5} />
</div>
<div className="pa3 w4">
<Rectangle height={32} />
</div>
</div>
<div className="b--black-20 ba br2 mh2 flex flex-column" style={{ flex: 1 }}>
<Rectangle height={200} />
<div className="pa3" style={{ flex: 1 }}>
<div className="mb3"><Block numberOfBlocks={5} /></div>
<Block numberOfBlocks={10} />
</div>
<div className="pa3 w4">
<Rectangle height={32} />
</div>
</div>
</div>
</div>
}
source={`
<div style="display: flex;">
<!-- Column -->
<div style="
flex: 1;
/* Space between columns */
margin: 0 8px;
/* Layout each column */
display: flex;
flex-direction: column;
">
<!-- Cover -->
...
<!-- Content -->
<div style="
/* Take available height */
flex: 1;
">
...
</div>
<!-- Button sticks to the bottom -->
...
</div>
<!-- Repeat with other columns -->
...
</div>
`}
/>
</div>
</DetailsLayout>
);
};
export default Details;