All files / apps/portfolio/app/components WorkflowGlyph.vue

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
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 27 28 29 30 31 32 33  2x               1x 4x                                            
<template>
    <svg
        data-workflow-glyph
        :width="map.width"
        :height="map.height"
        :viewBox="`0 0 ${map.width} ${map.height}`"
        role="img"
        :aria-label="label"
    >
        <path v-for="edge in map.edges" :key="edge.id" :d="edge.d" data-edge />
        <rect
            v-for="node in map.nodes"
            :key="node.id"
            :x="node.x"
            :y="node.y"
            :width="map.nodeWidth"
            :height="map.nodeHeight"
            :data-tone="node.tone"
        />
    </svg>
</template>
 
<script setup lang="ts">
import type { ProjectMap } from "~/types/ProjectMap";
 
interface Props {
    map: ProjectMap;
    label: string;
}
 
defineProps<Props>();
</script>