-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
refactor(v2): use SVG for external link icon #4914
Conversation
{isInternalUrl(href) ? ( | ||
label | ||
) : ( | ||
<span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This span
element is required for the proper positioning of the icon (in the context of a text link).
✔️ [V2] 🔨 Explore the source changes: 0ef25e6 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60bc68123b8bee000748dbb5 😎 Browse the preview: https://deploy-preview-4914--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4914--docusaurus-2.netlify.app/ |
✔️ [V1] 🔨 Explore the source changes: 0ef25e6 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-1/deploys/60bc681207a9d80007a88096 😎 Browse the preview: https://deploy-preview-4914--docusaurus-1.netlify.app |
Size Change: -419 B (0%) Total Size: 621 kB
ℹ️ View Unchanged
|
thanks, LGTM 👍 |
Motivation
A more correct approach for placing external link icon, since this icon must be part (continuation) of link text (see screenshots below for better understanding).
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)