1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-12 09:04:26 +02:00

Add same height columns

This commit is contained in:
Phuoc Nguyen
2019-11-17 12:10:40 +07:00
parent 3b615d2aef
commit 6df15baf86
6 changed files with 140 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ const Block = ({ numberOfBlocks }) => {
const s = random(1, 5);
return (
<div key={i} className={`mr2 mb2 w-${s * 10}`}>
<Rectangle height={8} />
<div className="w-100 bg-black-30 br-pill" style={{ height: '8px' }} />
</div>
);
})

View File

@@ -3,7 +3,7 @@ import React from 'react';
const Rectangle = ({ height = 8 }) => {
return (
<div
className="w-100 bg-black-30 br-pill"
className="w-100 bg-black-30"
style={{ height: `${height}px` }}
/>
);