3737 <span class =" sr-only" >Close panel</span >
3838 <XMarkIcon class =" size-6" aria-hidden =" true" />
3939 </button >
40- <div class =" px-6 pt-6 pb-4" >
40+ <div class =" px-6 pt-10 pb-4" >
4141 <DialogTitle class =" text-base font-semibold text-white" >{{
4242 event.heading
4343 }}</DialogTitle >
4444 </div >
4545 <div class =" relative flex-1 px-6 pb-6" >
46- <!-- Show any json field and value in event -->
47- <div v-for =" (value, key) in event" :key =" key" class =" mb-4" >
48- <h3 class =" text-sm font-medium text-gray-400" >{{ key }}</h3 >
49- <p class =" mt-1 text-sm text-gray-200" >{{ value }}</p >
46+ <div v-for =" field in eventFields" :key =" field.key" class =" mb-4" >
47+ <h3 class =" text-sm font-medium text-gray-400" >{{ field.label }}</h3 >
48+ <p class =" mt-1 text-sm text-gray-200" >{{ event[field.key] }}</p >
5049 </div >
5150 </div >
5251 </DialogPanel >
5958<script setup>
6059import { Dialog , DialogPanel , DialogTitle , TransitionChild , TransitionRoot } from " @headlessui/vue"
6160import { XMarkIcon } from " @heroicons/vue/24/outline"
62- import { defineProps , defineEmits } from " vue"
61+ import { defineProps , defineEmits , computed } from " vue"
6362
6463defineProps ({
6564 open: Boolean ,
@@ -69,4 +68,10 @@ defineProps({
6968 },
7069})
7170const emit = defineEmits ([" close" ])
71+ const eventFields = computed (() => [
72+ { key: " by" , label: " By" },
73+ { key: " time" , label: " Time" },
74+ { key: " location" , label: " Location" },
75+ { key: " description" , label: " Description" },
76+ ])
7277 </script >
0 commit comments