Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[paragon-openedx.netlify.app] Hyperlink should be compatible with React Router Link #3050

Open
1 task
adamstankiewicz opened this issue May 13, 2024 · 0 comments · May be fixed by #3082
Open
1 task

[paragon-openedx.netlify.app] Hyperlink should be compatible with React Router Link #3050

adamstankiewicz opened this issue May 13, 2024 · 0 comments · May be fixed by #3082
Labels
good first issue A good task for a newcomer to start with

Comments

@adamstankiewicz
Copy link
Member

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 the Hyperlink component with a React Router Link 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 the Hyperlink 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 an as 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

@adamstankiewicz adamstankiewicz added the good first issue A good task for a newcomer to start with label May 13, 2024
@adamstankiewicz adamstankiewicz changed the title [paragon-openedx.netlify.app] Feedback (on /components/hyperlink/) [paragon-openedx.netlify.app] Hyperlink should be compatible with React Router Link May 13, 2024
@adamstankiewicz adamstankiewicz linked a pull request May 29, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good task for a newcomer to start with
Projects
Status: Backlog
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant