All files / apps/huella-legal/app/components/base Kicker.vue

100% Statements 4/4
100% Branches 4/4
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26    98x                                     98x   98x    
<template>
    <ULink
        v-if="to"
        :to
        raw
        class="inline-block text-kicker underline-offset-4 hover:underline focus-visible:rounded-xs"
        :class="toneClass"
    >
        <slot />
    </ULink>
    <span v-else class="inline-block text-kicker" :class="toneClass"><slot /></span>
</template>
 
<script setup lang="ts">
import type { RouteLocationRaw } from "vue-router";
 
interface Props {
    to?: RouteLocationRaw;
    muted?: boolean;
}
 
const props = withDefaults(defineProps<Props>(), { muted: false });
 
const toneClass = computed<string>(() => (props.muted ? "text-muted" : "text-secondary"));
</script>