feat(svelte): add minimap component

This commit is contained in:
moklick
2023-02-20 12:25:04 +01:00
parent 51fd1cc01a
commit 5452ad99ed
8 changed files with 153 additions and 3 deletions
@@ -0,0 +1,34 @@
<script lang="ts">
import cc from 'classcat';
export let x: number;
export let y: number;
export let width: number = 0;
export let height: number = 0;
export let borderRadius: number;
export let color: string;
export let shapeRendering: string;
export let strokeColor: string;
export let strokeWidth: number;
export let className: string = '';
export let style: Record<string, string>;
export { className as class };
const { background, backgroundColor } = style || {};
const fill = (color || background || backgroundColor) as string;
</script>
<rect
class={cc(['react-flow__minimap-node', className])}
x={x}
y={y}
rx={borderRadius}
ry={borderRadius}
width={width}
height={height}
fill={fill}
stroke={strokeColor}
stroke-width={strokeWidth}
shape-rendering={shapeRendering}
/>