From 41ff3c0d22f54618dc8cc0d571f5bb507423dfdb Mon Sep 17 00:00:00 2001 From: sairina Date: Mon, 30 Nov 2020 19:16:31 -0800 Subject: [PATCH 1/2] adds boolean prop openInNewTab --- lib/buttons-and-links/KExternalLink.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/buttons-and-links/KExternalLink.vue b/lib/buttons-and-links/KExternalLink.vue index 2ac368506..d3ec83208 100644 --- a/lib/buttons-and-links/KExternalLink.vue +++ b/lib/buttons-and-links/KExternalLink.vue @@ -5,6 +5,8 @@ :class="buttonClasses" :href="href" :download="download" + :openInNewTab="openInNewTab" + :target="openInNewTab ? '_blank' : false" dir="auto" @mouseenter="hovering = true" @mouseleave="hovering = false" @@ -70,6 +72,13 @@ type: String, required: false, }, + /** + * If provided, opens link in new tab + */ + openInNewTab: { + type: Boolean, + required: false, + }, }, data() { return { From 3e76a9a7520c67b17a32422fc6b3b4e20262d2d9 Mon Sep 17 00:00:00 2001 From: Sairina Date: Tue, 1 Dec 2020 09:49:17 -0800 Subject: [PATCH 2/2] Update lib/buttons-and-links/KExternalLink.vue Co-authored-by: Devon Rueckner --- lib/buttons-and-links/KExternalLink.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buttons-and-links/KExternalLink.vue b/lib/buttons-and-links/KExternalLink.vue index d3ec83208..b5e5d0cc1 100644 --- a/lib/buttons-and-links/KExternalLink.vue +++ b/lib/buttons-and-links/KExternalLink.vue @@ -77,7 +77,7 @@ */ openInNewTab: { type: Boolean, - required: false, + default: false, }, }, data() {