feat(svelte): cleanup styling, use css variables

This commit is contained in:
moklick
2023-06-06 19:44:39 +02:00
parent 32ddd6fac9
commit 98d9d3e51a
20 changed files with 190 additions and 101 deletions
@@ -10,12 +10,8 @@
export let shapeRendering: string;
export let strokeColor: string;
export let strokeWidth: number = 2;
export let style: Record<string, string>;
let className: string = '';
export { className as class };
const { background, backgroundColor } = style || {};
const fill = (color || background || backgroundColor) as string;
</script>
<rect
@@ -26,7 +22,7 @@
ry={borderRadius}
{width}
{height}
{fill}
fill={color}
stroke={strokeColor}
stroke-width={strokeWidth}
shape-rendering={shapeRendering}