66 lines
1.6 KiB
Vue
66 lines
1.6 KiB
Vue
<template>
|
|
<a v-if="linkType === 'navigation'" @click="handleClick" class="navigation-link" :href="href">{{text}}</a>
|
|
<a v-else-if="linkType === 'footer'" @click="handleClick" class="footer-link" :href="href" target="_blank">{{text}}</a>
|
|
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{text}}</a>
|
|
<a v-else-if="linkType === 'dashedUnderline'" @click="handleClick" class="dashed-underline" :href="href">{{text}}</a>
|
|
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">{{text}}</a>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "textLink",
|
|
props: {
|
|
linkType: String,
|
|
text: String,
|
|
href: {
|
|
type: String,
|
|
},
|
|
},
|
|
methods: {
|
|
handleClick(event) {
|
|
this.pushEventToGA(this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.text, true);
|
|
this.$emit("click-event");
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
a {
|
|
display: inline-flex !important;
|
|
color: $blue;
|
|
text-underline-offset: 0.5em;
|
|
line-height: 26px;
|
|
padding: 0 0 4px 0;
|
|
font-weight: 500;
|
|
&:hover {
|
|
color: $blue-700;
|
|
}
|
|
&.small {
|
|
line-height: 24px;
|
|
&:hover {
|
|
color: $blue-700;
|
|
}
|
|
}
|
|
&.navigation-link {
|
|
color: $black;
|
|
line-height: 26px;
|
|
white-space: nowrap;
|
|
}
|
|
&.footer-link {
|
|
color: $gray-600;
|
|
text-decoration: none;
|
|
line-height: 20px;
|
|
padding: 0 0 2px 0;
|
|
font-weight: 400;
|
|
font-size: 0.75rem;
|
|
&:hover {
|
|
padding: 0 0 2px 0;
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
&.dashed-underline {
|
|
text-decoration: underline dashed 1px;
|
|
}
|
|
}
|
|
</style>
|