Skip to content

Commit

Permalink
Merge pull request #268 from PrefectHQ/p-link-abs
Browse files Browse the repository at this point in the history
BugFix: p-link icon absolute
  • Loading branch information
stackoverfloweth authored Jul 5, 2022
2 parents 3d54799 + 163658d commit 27a6a0d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/components/Link/PLink.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<a v-if="externalLink" :href="externalLink" target="_blank" class="p-link">
<slot /><p-icon class="p-link__external-icon" icon="ExternalLinkIcon" />
<a v-if="externalLink" :href="externalLink" target="_blank" class="p-link p-link--external">
<slot />
<p-icon class="p-link__external-icon" icon="ExternalLinkIcon" />
</a>

<!-- This is necessary because the router-link component throws an unrecoverable error if no to prop is provided -->
Expand Down Expand Up @@ -35,16 +36,22 @@

<style>
.p-link { @apply
relative
text-primary
font-semibold
cursor-pointer
whitespace-nowrap
}
.p-link--external { @apply
mr-3
}
.p-link__external-icon { @apply
absolute
-top-2
-right-2
w-3
h-3
align-super
inline
}
</style>

0 comments on commit 27a6a0d

Please sign in to comment.