Add new components for login and comment functionality
This commit is contained in:
28
components/kl-svg-icon/index.vue
Normal file
28
components/kl-svg-icon/index.vue
Normal file
@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<svg aria-hidden="true" class="svg-icon">
|
||||
<use :xlink:href="symbolId" :fill="color" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
prefix: { type: String, default: 'icon' },
|
||||
iconClass: { type: String, required: true },
|
||||
color: { type: String, default: '' },
|
||||
})
|
||||
|
||||
const symbolId = computed(() => `#${props.prefix}-${props.iconClass}`)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
overflow: hidden;
|
||||
fill: currentColor;
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user