23 lines
584 B
Vue
23 lines
584 B
Vue
<script lang="ts" setup>
|
|
import { string } from 'yup';
|
|
const propo = defineProps<{name: string; istyle: "regular" | "light" | "solid" | "thin"; size?: number;}>()
|
|
const styleMap = {
|
|
"regular": "r",
|
|
"light": "l",
|
|
"solid": "s",
|
|
"thin": "t"
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<span :style="{display: 'inline-block', width: `${size || 20}px`, height: `${size || 20}px`}">
|
|
<i :style="{
|
|
fontSize: `${size || 20}px`,
|
|
display: 'inline-block',
|
|
width: 'inherit',
|
|
height: 'inherit'
|
|
}" :class="`fa${styleMap[istyle]} fa-${name}`"/>
|
|
</span>
|
|
</template> |