1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 02:36:11 +02:00

Define typescript type for placeholders

This commit is contained in:
Phuoc Nguyen
2019-11-24 23:18:12 +07:00
parent 642e179699
commit 154a61de91
11 changed files with 50 additions and 14 deletions

View File

@@ -2,7 +2,13 @@ import React from 'react';
import random from '../helpers/random';
const Block = ({ justify = 'start', numberOfBlocks = 1, blockHeight = 4 }) => {
interface BlockProps {
blockHeight?: number;
justify?: string;
numberOfBlocks?: number;
}
const Block: React.FC<BlockProps> = ({ justify = 'start', numberOfBlocks = 1, blockHeight = 4 }) => {
return (
<div className={`flex flex-wrap w-100 justify-${justify}`}>
{