<template>
  <component :is="componentName" :data="data" />
</template>
<script lang="ts" setup>
  import { computed } from 'vue';

  const props = defineProps({
    name: String,
    data: Object,
  });

  const componentName = computed(() => {
    return props.name + '-view';
  });
</script>
