1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-05 21:57:32 +02:00

Support size

This commit is contained in:
Phuoc Nguyen
2021-04-03 12:32:23 +07:00
parent 8d1041ad9b
commit 3b93e2d3b7

View File

@@ -7,20 +7,20 @@ import * as React from 'react';
interface SquareProps {
backgroundColor?: string;
size?: number;
size?: string;
}
const Square: React.FC<SquareProps> = ({
backgroundColor = 'rgba(0, 0, 0, 0.3)',
size = 8,
size = '100%',
}) => {
return (
<div
style={{
backgroundColor,
borderRadius: '4px',
height: '100%',
width: '100%',
borderRadius: '0.25rem',
height: size,
width: size,
}}
/>
);