shadcn-vue/apps/www/.vitepress/theme/components/BlockPage.vue
zernonia a03bace32c
feat: Blocks (#428)
* chore: build registry

* feat: block preview

* refactor: change to use iframe
feat: add more blocks

* chore: fix build

* feat: add all other blocks

* feat: add copy button

* chore: cleanup
2024-03-23 18:24:48 +08:00

13 lines
403 B
Vue

<script setup lang="ts">
import { useUrlSearchParams } from '@vueuse/core'
import ComponentLoader from './ComponentLoader.vue'
const params = useUrlSearchParams('hash-params')
</script>
<template>
<div v-if="params.name && params.style" :class="params.containerClass">
<ComponentLoader :key="params.style?.toString()" :name="params.name?.toString()" :type-name="'block'" />
</div>
</template>