export htmlattributes as props where possible

This commit is contained in:
peterkogo
2025-04-14 18:59:31 +02:00
parent 6be1b7822b
commit 2ca682c6f2
33 changed files with 173 additions and 197 deletions
@@ -1,5 +1,4 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { BaseEdgeProps } from '../../types';
import EdgeLabel from '../EdgeLabel/EdgeLabel.svelte';
@@ -16,7 +15,7 @@
interactionWidth = 20,
class: className,
...rest
}: BaseEdgeProps & HTMLAttributes<SVGPathElement> = $props();
}: BaseEdgeProps = $props();
</script>
<path
@@ -41,7 +40,7 @@
{/if}
{#if label}
<EdgeLabel x={labelX} y={labelY} style={labelStyle}>
<EdgeLabel x={labelX} y={labelY} style={labelStyle} selectEdgeOnClick>
{label}
</EdgeLabel>
{/if}