feat(background): add cross variant closes #2320

This commit is contained in:
moklick
2022-07-26 18:26:20 +02:00
parent b7322f8f45
commit 7f18bfbe64
7 changed files with 139 additions and 29 deletions
+18 -3
View File
@@ -1,9 +1,24 @@
import React from 'react';
export const createGridLinesPath = (size: number, strokeWidth: number, stroke: string): React.ReactElement => {
return <path stroke={stroke} strokeWidth={strokeWidth} d={`M${size / 2} 0 V${size} M0 ${size / 2} H${size}`} />;
export const createGridLinesPath = (
dimensions: [number, number],
strokeWidth: number,
stroke: string
): React.ReactElement => {
return (
<path
stroke={stroke}
strokeWidth={strokeWidth}
d={`M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${
dimensions[0]
}`}
/>
);
};
export const createGridDotsPath = (size: number, fill: string): React.ReactElement => {
export const createGridDotsPath = (
size: number,
fill: string
): React.ReactElement => {
return <circle cx={size} cy={size} r={size} fill={fill} />;
};