<!-- 
    使用：<icon-svg name="icon-微信" class="icon" /> 
-->

<script setup>
defineProps({
  name: {
    type: String,
    required: true,
  },
  className: {
    type: String,
    default: '',
  },
})
</script>

<template>
  <svg :class="className" aria-hidden="true">
    <use :xlink:href="`#${name}`" />
  </svg>
</template>

<style scoped>
.svg-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
  overflow: hidden;
}
</style>
