All files / apps/huella-legal/layers/articles/app/components/summary List.vue

100% Statements 4/4
100% Branches 0/0
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  13x 21x                               13x          
<template>
    <ol class="flex flex-col divide-y divide-muted">
        <li v-for="article in articles" :key="article.id" :class="SPACING[variant]">
            <SummaryCard :article :variant />
        </li>
    </ol>
</template>
 
<script setup lang="ts">
type Variant = "standard" | "row";
 
interface Props {
    articles: ArticleSummary[];
    variant?: Variant;
}
 
withDefaults(defineProps<Props>(), { variant: "row" });
 
const SPACING = {
    standard: "py-7",
    row: "py-6 md:py-8",
} as const satisfies Record<Variant, string>;
</script>