i want to pass props customActionComponent as component and need to render in child component
FlightDetail.vue
<template>
<ComponentCard
title="Flight Details"
subtitle="March 25th"
:tableComponent="FlightDetailTable"
:actionComponent="customActionComponent"
/>
</template>
<script setup>
import ComponentCard from '@/components/ComponentCard.vue'
import FlightDetailTable from '@/components/FlightDetailTable.vue'
const customActionComponent = {
template: `
<v-row align="center">
<v-col>
<v-btn class="rounded-pill ml-3 custom-button">
<v-icon>mdi-arrow-left</v-icon>
</v-btn>
</v-col>
<v-col class="d-flex justify-end">
<v-btn class="rounded-pill custom-button">
Flight
</v-btn>
<v-btn class="rounded-pill ml-4 mr-4 custom-button">
Delay
</v-btn>
</v-col>
</v-row>`,
}
</script>
<style scoped>
.custom-button {
background-color: #114b5f;
color: white;
font-weight: bold;
}
</style>
ComponentCard.vue
<script setup>
import { defineProps } from 'vue'
const props = defineProps({
title: String,
subtitle: String,
tableComponent: Object,
actionComponent:Object,
});
</script>
<template>
<v-card variant="text">
<v-card-item>
<v-card-title style="color: #114b5f;">{{ props.title }}</v-card-title>
<v-card-subtitle style="color: #114b5f;">{{ props.subtitle }}</v-card-subtitle>
</v-card-item>
<v-card-text>
<component :is="props.tableComponent" />
</v-card-text>
<v-card-actions v-if="props.actionComponent">
<component :is="props.actionComponent" />
</v-card-actions>
</v-card>
</template>
tableComponent can render successfully but can't visible actionComponent.
what is the best way to define customActionComponent and pass as props in child component