Skip to content

Instantly share code, notes, and snippets.

Created Jul 5, 2022
What would you like to do?
import styled, { css } from "styled-components";
const GridBlock = styled.div`
${props =>
props.size &&
width: ${props.size - Math.floor(props.size / 10)}px;
height: ${props.size - Math.floor(props.size / 10)}px;
border: ${Math.floor(props.size / 20)}px solid black;
${props =>
props.color &&
background-color: rgb(${props.color});
export default GridBlock;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment