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

feat: Make external links themeable with Chakra UI #238

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

tundera
Copy link
Contributor

@tundera tundera commented Oct 20, 2021

External links are currently implemented with <a> tags in JSX. Chakra UI has a Link component which has the same functionality as a, while also making the links themeable through variants defined in the default or a custom theme via Chakra's theming API. See this discussion for context and an example.

Changes

  • Replaces use of anchor tags for external links with the Link component from Chakra UI
  • Replace the use of target="_blank" and rel="noopener noreferrer" attributes on external links with the isExternal prop on the substituted Link components which provides the same functionality

Screenshots

themable-links

Checklist

  • Requires dependency update?
  • Generating a new app works

Copy link

@lschjeide lschjeide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

Copy link
Contributor

@code-jenn-or code-jenn-or left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is overlap with this and the footer component PR #235 so we will have some collisions if both are merged.

Copy link
Contributor

@kyleshevlin kyleshevlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I don't mind if you merge this first, I can fix my PR no problem.

Copy link
Contributor

@kgajera kgajera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tundera Can you rebase this with canary? This is good to merge once the CI passes.

@tundera tundera merged commit ff4fe13 into echobind:canary Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants