mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
30 lines
452 B
Vue
30 lines
452 B
Vue
<script setup lang="ts">
|
|
import type { Component } from 'vue'
|
|
|
|
defineProps<{
|
|
icon: Component
|
|
link: string
|
|
text: string
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<a
|
|
:href="link"
|
|
:title="text"
|
|
target="_blank"
|
|
rel="noreferrer noopener"
|
|
class="social-link"
|
|
>
|
|
<ElIcon v-if="icon" :size="24">
|
|
<component :is="icon" />
|
|
</ElIcon>
|
|
</a>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
.social-link {
|
|
color: var(--text-color);
|
|
}
|
|
</style>
|