Adjust SvelteFlow and allow for null to use CSS variable

This commit is contained in:
Alessandro
2025-08-11 13:59:38 +02:00
parent 4c389117b7
commit d060c3fa87
5 changed files with 44 additions and 5 deletions
@@ -5,7 +5,7 @@ import { useStore } from '../../hooks/useStore';
import { useMarkerSymbol } from './MarkerSymbols';
type MarkerDefinitionsProps = {
defaultColor: string;
defaultColor: string | null;
rfId?: string;
};
@@ -8,7 +8,7 @@
height = 12.5,
markerUnits = 'strokeWidth',
orient = 'auto-start-reverse',
color,
color = 'none',
strokeWidth
}: MarkerProps = $props();
@@ -230,9 +230,10 @@ export type SvelteFlowProps<
*/
snapGrid?: SnapGrid;
/** Color of edge markers
* You can pass `null` to use the CSS variable `--xy-edge-stroke` for the marker color.
* @example "#b1b1b7"
*/
defaultMarkerColor?: string;
defaultMarkerColor?: string | null;
/**
* Controls if all nodes should be draggable
* @default true
+1 -1
View File
@@ -26,7 +26,7 @@ export function createMarkerIds(
defaultMarkerEnd,
}: {
id?: string | null;
defaultColor?: string;
defaultColor?: string | null;
defaultMarkerStart?: EdgeMarkerType;
defaultMarkerEnd?: EdgeMarkerType;
}