logigate/app/components/editor/CrossingIcon.vue

15 lines
452 B
Vue

<script setup lang="ts">
import { wirePath } from '~/lib/draw'
import type { CrossingStyle } from '~/lib/logic/types'
const props = defineProps<{ style: CrossingStyle }>()
const d = computed(() => wirePath([[3, 14], [37, 14]], new Map([[0, [20]]]), props.style, 1))
</script>
<template>
<svg viewBox="0 0 40 24" width="40" height="24" aria-hidden="true">
<path d="M20 3V23" class="ci-v" />
<path :d="d" class="ci-h" />
</svg>
</template>