Skip to content

[chore]: Make stroke color configurable in SvgEdgesLayer #3506

@Deepanshu1230

Description

@Deepanshu1230

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions