2022-08-08 18:41:29 -04:00
|
|
|
<script setup lang="ts">
|
2024-10-16 13:25:13 -04:00
|
|
|
const { highlight } = defineProps<{
|
2023-05-24 12:46:44 -04:00
|
|
|
name: string;
|
2022-08-10 16:31:25 -04:00
|
|
|
dest: string;
|
|
|
|
highlight?: boolean;
|
|
|
|
}>();
|
2023-05-24 12:46:44 -04:00
|
|
|
|
2023-06-11 21:20:41 -04:00
|
|
|
// const isLinkableTag = !props.name.includes(" ");
|
|
|
|
const isLinkableTag = true;
|
2023-05-24 12:46:44 -04:00
|
|
|
const tagClass = [
|
2024-05-11 18:05:57 -04:00
|
|
|
"inline-block text-xs rounded-lg py-1 px-2 mt-1 mr-1 transition border border-pink-200 dark:border-pink-900 border-2 font-medium no-underline",
|
2024-10-16 13:25:13 -04:00
|
|
|
{ "bg-pink-200 dark:bg-pink-900": highlight },
|
2023-05-24 12:46:44 -04:00
|
|
|
{ "shadow-md": isLinkableTag },
|
|
|
|
];
|
2022-08-08 18:41:29 -04:00
|
|
|
</script>
|
|
|
|
|
2022-08-08 17:49:35 -04:00
|
|
|
<template>
|
2024-05-11 18:05:57 -04:00
|
|
|
<div :class="tagClass">
|
|
|
|
<a :href="dest" v-if="isLinkableTag">
|
2023-05-24 12:46:44 -04:00
|
|
|
{{ name }}
|
2024-05-11 18:05:57 -04:00
|
|
|
</a>
|
|
|
|
<div v-else>
|
2023-05-24 12:46:44 -04:00
|
|
|
{{ name }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-08 17:49:35 -04:00
|
|
|
</template>
|