import * as React from 'react'; import { random } from '../utils/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;