1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-19 12:21:23 +02:00

Use placeholder for centering

This commit is contained in:
Phuoc Nguyen
2019-11-16 12:28:22 +07:00
parent 265704064a
commit 44e63f0dac
8 changed files with 25 additions and 16 deletions

View File

@@ -1,8 +1,14 @@
import React from 'react';
const Dot = () => {
const Dot = ({ size = 16 }) => {
return (
<div className="bg-black-30 br-pill w1 h1" />
<div
className="bg-black-30 br-pill"
style={{
height: `${size}px`,
width: `${size}px`,
}}
/>
);
};

View File

@@ -1,13 +1,10 @@
import React from 'react';
const Frame = ({ children, size }) => {
const bw = (size === 'medium' ? '2px' : '1px');
const Frame = ({ children }) => {
return (
<div
className="ba b--black-30 br2"
style={{
borderWidth: bw,
height: '100px',
width: '100px',
}}