department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
0 stars 0 forks source link

BUG - 2 - All - Link Component Icon Override Issues #274

Closed TimRoe closed 2 months ago

TimRoe commented 2 months ago

What happened?

A Slack conversation highlighted an issue with overriding icon properties in the Link component. The Link component just allows a passthrough of Icon properties, but did not account for the subsequent changes that the Icon component's props requires either name or svg prop be sent even though the Link already handles setting that so this would require apps to mimic the logic within Link component.

Steps to Reproduce

  1. Within the Link component, attempt to set an override for icon besides changing the icon itself (e.g. preventScaling)
  2. ** Note: the typing also requires sending name or svg despite the Link component already doing that

Desired behavior

Consumers of the Link component shouldn't need to set name or svg for variants that automatically handle setting the icon appropriately.

Acceptance Criteria

Can apply various overrides to the Link icon without having to manually set the icon.

Bug Severity - BE SURE TO ADD THE SEVERITY LABEL

See [Bug Tracking](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/QA#issue-severity) for details on severity levels