<script setup lang="ts">
import { computed } from 'vue'

const props = defineProps<{
  name: string,
  size?: number,
  color?: string
}>()
const symbolId = computed(() => `#icon-${props.name}`)
const newColor = computed(() => `${props.color ?? '#ccc'}`)
const newSize = computed(() => `${props.size ?? 16}`)
</script>
<template>
  <svg
    aria-hidden="true"
    :font-size="newSize"
    :width="newSize"
    :height="newSize"
  >

    <use
      :href="symbolId"
      :fill="newColor"
      :fill-rule="undefined"
    />
  </svg>
</template>