1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-06 14:16:50 +02:00

Circle and Rectangle use pure styles

This commit is contained in:
Phuoc Nguyen
2019-11-25 22:37:59 +07:00
parent 078161d57e
commit c52a089e49
2 changed files with 8 additions and 3 deletions

View File

@@ -7,8 +7,9 @@ interface CircleProps {
const Circle: React.FC<CircleProps> = ({ size = 16 }) => {
return (
<div
className="bg-black-30 br-pill"
style={{
backgroundColor: 'rgba(0, 0, 0, .3)',
borderRadius: '9999px',
height: `${size}px`,
width: `${size}px`,
}}

View File

@@ -7,8 +7,12 @@ interface RectangleProps {
const Rectangle: React.FC<RectangleProps> = ({ height = 8 }) => {
return (
<div
className="w-100 bg-black-30 br1"
style={{ height: `${height}px` }}
style={{
backgroundColor: 'rgba(0, 0, 0, .3)',
borderRadius: '2px',
height: `${height}px`,
width: '100%',
}}
/>
);
};