/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2020 Nguyen Huu Phuoc */ import React from 'react'; import random from '../helpers/random'; interface BlockProps { backgroundColor?: string; blockHeight?: number; justify?: string; numberOfBlocks?: number; } const Block: React.FC = ({ backgroundColor = 'rgba(0, 0, 0, 0.3)', blockHeight = 4, justify = 'start', numberOfBlocks = 1, }) => { return (
{ Array(numberOfBlocks).fill(0).map((_, i) => { const s = random(1, 5); return (
); }) }
); }; export default Block;