<template>
  <i v-if="type==='class'" :class="[`iconfont ${fontClass}`]" :style="{fontSize:`${size}px`}"/>
  <svg v-else-if="type === 'svg'" :style="{width:`${size}px`,height:`${size}px`}">
    <use :href="`#${fontClass}`"/>
  </svg>
</template>

<script setup lang="ts">


import {IconFontProps} from "@/types/components/iconfont/IconFont";

withDefaults(defineProps<IconFontProps>(), {
  size: 25,
  type: "svg"
});
// import {onMounted} from "vue";
// onMounted(() => {
//   console.log(props.fontClass, props.type);
// });
</script>

<style scoped lang="scss">

</style>
