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:
@@ -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,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
Reference in New Issue
Block a user