From 615d9269eaa4deb2600dec8851c9a3e8dc21ed3a Mon Sep 17 00:00:00 2001 From: Graham Smith <gsmith@skye.local> Date: Wed, 15 Jul 2020 10:51:55 -0400 Subject: [PATCH] add external link component --- src/App.vue | 4 ---- src/components/ExternalLink.vue | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/components/ExternalLink.vue diff --git a/src/App.vue b/src/App.vue index a02aa57a..125e2ea8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -48,10 +48,6 @@ body { a { text-decoration: none; - .bi-box-arrow-up-right.b-icon { - top: -2px; - position: relative; - } } button.btn { diff --git a/src/components/ExternalLink.vue b/src/components/ExternalLink.vue new file mode 100644 index 00000000..dbc64dbc --- /dev/null +++ b/src/components/ExternalLink.vue @@ -0,0 +1,27 @@ +<template> + <b-button variant="link" :href="href" :class="{ inline }" target="_blank"> + <slot></slot> + <b-icon icon="box-arrow-up-right" aria-hidden="true"></b-icon> + </b-button> +</template> +<script> +export default { + props: { + href: String, + inline: Boolean + } +}; +</script> +<style lang="scss" scoped> +a { + .bi-box-arrow-up-right.b-icon { + top: -2px; + position: relative; + } + + &.inline { + padding: 0; + margin-top: -3px; + } +} +</style> -- GitLab