[paragon-openedx.netlify.app] Hyperlink
should be compatible with React Router Link
#3050
Labels
good first issue
A good task for a newcomer to start with
Improvements
Hyperlink
is currently always a wrapper around the standard HTML anchor tag (i.e.,<a>
). As a result, it is not currently possible to use theHyperlink
component with a React RouterLink
for internal page routes within React applications.Given this, consumers implementing links to internal page routes typically rely on
Link
directly, accepting a tradeoff that theHyperlink
component's built-in color and link variants are not applicable to the internal route link.To mitigate this,
Hyperlink
should be extended to support anas
prop similar to other components throughout the Paragon component library. This addition would allow consumers to render<Hyperlink as={Link} ... />
and still have consistently styled links even when the link used React routing for an internal page route.Tasks
The text was updated successfully, but these errors were encountered: