Description
SvgEdgesLayer currently applies a hard-coded default stroke color (#000) via an outer <g> wrapper: const INHERIT_STROKE = { stroke: '#000' };
Problem
- The default edge stroke color is hard-coded
- Customization relies on CSS overrides
- No public API exists to configure the default edge stroke
Proposed Change
Introduce an optional prop (for example, defaultStroke) on SvgEdgesLayer to allow consumers to configure the default edge stroke color.
-
Preserve #000 as the default to maintain backward compatibility
-
Pass the computed stroke style to the outer <g> wrapper via extraWrapper
-
Remove the hard-coded INHERIT_STROKE constant
Acceptance Criteria
- Default edge stroke color can be configured via a public API
- Existing behavior remains unchanged when no prop is provided
- The change is backward compatible
- Inline comments or documentation are updated as needed
Additional Context
This change addresses the existing TODO in the codebase and improves flexibility for applications that require custom edge styling without relying on CSS overrides.
I am happy to work on this and submit a PR!
Description
SvgEdgesLayer currently applies a hard-coded default stroke color (
#000) via an outer<g>wrapper:const INHERIT_STROKE = { stroke: '#000' };Problem
Proposed Change
Introduce an optional prop (for example,
defaultStroke) onSvgEdgesLayerto allow consumers to configure the default edge stroke color.Preserve
#000as the default to maintain backward compatibilityPass the computed stroke style to the outer
<g>wrapper viaextraWrapperRemove the hard-coded
INHERIT_STROKEconstantAcceptance Criteria
Additional Context
This change addresses the existing TODO in the codebase and improves flexibility for applications that require custom edge styling without relying on CSS overrides.
I am happy to work on this and submit a PR!