feat(background): add cross variant closes #2320
This commit is contained in:
@@ -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} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user