Refactor: CSS handling (#2344)

* refactor(css): only load base styles, add css task, cleanup exports
* style(base): add edge label bg
* refactor(css): use css-utils
* feat(core): add Panel component
* refactor(background): cleanup
* refactor(css-handling): cleanup
This commit is contained in:
Moritz Klack
2022-08-05 18:36:32 +02:00
committed by GitHub
parent af28431990
commit 97c22ace71
89 changed files with 1853 additions and 20334 deletions
+32
View File
@@ -0,0 +1,32 @@
import React from 'react';
type LinePatternProps = {
dimensions: [number, number];
lineWidth?: number;
color: string;
};
export function LinePattern({
color,
dimensions,
lineWidth,
}: LinePatternProps) {
return (
<path
stroke={color}
strokeWidth={lineWidth}
d={`M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${
dimensions[0]
}`}
/>
);
}
type DotPatternProps = {
radius: number;
color: string;
};
export const DotPattern = ({ color, radius }: DotPatternProps) => {
return <circle cx={radius} cy={radius} r={radius} fill={color} />;
};