mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 14:16:50 +02:00
Support size
This commit is contained in:
@@ -7,20 +7,20 @@ import * as React from 'react';
|
|||||||
|
|
||||||
interface SquareProps {
|
interface SquareProps {
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
size?: number;
|
size?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Square: React.FC<SquareProps> = ({
|
const Square: React.FC<SquareProps> = ({
|
||||||
backgroundColor = 'rgba(0, 0, 0, 0.3)',
|
backgroundColor = 'rgba(0, 0, 0, 0.3)',
|
||||||
size = 8,
|
size = '100%',
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
borderRadius: '4px',
|
borderRadius: '0.25rem',
|
||||||
height: '100%',
|
height: size,
|
||||||
width: '100%',
|
width: size,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user