docs/.vitepress/theme/components/SocialIcon.vue
raw| 1 | <template> |
| 2 | <svg |
| 3 | class="dyne-social-icon" |
| 4 | width="30" |
| 5 | height="30" |
| 6 | viewBox="0 0 24 24" |
| 7 | fill="none" |
| 8 | xmlns="http://www.w3.org/2000/svg" |
| 9 | aria-hidden="true" |
| 10 | > |
| 11 | <g v-html="icon"></g> |
| 12 | </svg> |
| 13 | </template> |
| 14 | |
| 15 | <script setup lang="ts"> |
| 16 | import { computed } from 'vue' |
| 17 | import { socialIcons, type SocialIconName } from './social-icons' |
| 18 | |
| 19 | const props = defineProps<{ |
| 20 | name: SocialIconName |
| 21 | }>() |
| 22 | |
| 23 | const icon = computed(() => socialIcons[props.name]) |
| 24 | </script> |