68 lines
1.5 KiB
Vue
68 lines
1.5 KiB
Vue
<template>
|
|
<a v-if="navigation" @click="handleClick" class="navigation-link" :href="href">{{text}}</a>
|
|
<a v-else-if="footer" @click="handleClick" class="footer-link" :href="href" target="_blank">{{text}}</a>
|
|
<a v-else-if="textSmall" @click="handleClick" class="small" :href="href">{{text}}</a>
|
|
<a v-else @click="handleClick" :href="href">{{text}}</a>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "textLink",
|
|
props: {
|
|
navigation: Boolean,
|
|
footer: Boolean,
|
|
textSmall: Boolean,
|
|
text: String,
|
|
href: {
|
|
type: String,
|
|
default: `javascript:void(0)`//Prevents page jump when value is empty or #
|
|
}
|
|
},
|
|
methods: {
|
|
handleClick() {
|
|
this.$emit('click-event');
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
a {
|
|
color: $blue;
|
|
text-decoration: none;
|
|
border-bottom: 1px solid $blue;
|
|
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;
|
|
border-bottom: 1px solid $black;
|
|
line-height: 26px;
|
|
display: inline-flex;
|
|
text-transform: capitalize;
|
|
white-space: nowrap;
|
|
}
|
|
&.footer-link {
|
|
color: $gray-600;
|
|
text-decoration: none;
|
|
border-bottom: 1px solid transparent;
|
|
line-height: 20px;
|
|
padding: 0 0 2px 0;
|
|
font-weight: 400;
|
|
font-size: .75rem;
|
|
&:hover {
|
|
border-bottom: 1px solid $gray-500;
|
|
padding: 0 0 2px 0;
|
|
}
|
|
}
|
|
}
|
|
</style>
|