fix: move tag anchor inside div
This commit is contained in:
parent
d5a2787f56
commit
1108f258c1
@ -8,20 +8,18 @@ const props = defineProps<{
|
|||||||
// const isLinkableTag = !props.name.includes(" ");
|
// const isLinkableTag = !props.name.includes(" ");
|
||||||
const isLinkableTag = true;
|
const isLinkableTag = true;
|
||||||
const tagClass = [
|
const tagClass = [
|
||||||
"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",
|
"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",
|
||||||
{ "bg-pink-200 dark:bg-pink-900": props.highlight },
|
{ "bg-pink-200 dark:bg-pink-900": props.highlight },
|
||||||
{ "shadow-md": isLinkableTag },
|
{ "shadow-md": isLinkableTag },
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a :href="dest" v-if="isLinkableTag">
|
|
||||||
<div :class="tagClass">
|
<div :class="tagClass">
|
||||||
|
<a :href="dest" v-if="isLinkableTag">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div :class="tagClass">
|
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user