feat: AcfPhone component
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fragment AcfPhone on AcfPhone {
|
||||
national
|
||||
e164
|
||||
extension
|
||||
}
|
||||
14
wp-content/themes/moonshine/app/components/acf/AcfPhone.vue
Normal file
14
wp-content/themes/moonshine/app/components/acf/AcfPhone.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { AcfPhoneFragment } from "#graphql/operations";
|
||||
|
||||
defineProps<{
|
||||
phone?: AcfPhoneFragment;
|
||||
link?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Component :is="link ? 'a' : 'span'" v-if="phone" :href="link ? `tel:${phone.e164}` : undefined">
|
||||
{{ phone.national }}{{ phone.extension ? ` ext. ${phone.extension}` : "" }}
|
||||
</Component>
|
||||
</template>
|
||||
Reference in New Issue
Block a user