mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
docs(ComponentExample): improve iframe display
This commit is contained in:
@@ -181,9 +181,16 @@ const urlSearchParams = computed(() => new URLSearchParams({ ...optionsValues.va
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center p-4" :class="props.class">
|
||||
<iframe v-if="iframe" v-bind="typeof iframe === 'object' ? iframe : {}" :src="`/examples/${name}?${urlSearchParams}`" class="w-full" />
|
||||
<component :is="camelName" v-else v-bind="{ ...componentProps, ...optionsValues }" />
|
||||
<iframe
|
||||
v-if="iframe"
|
||||
v-bind="typeof iframe === 'object' ? iframe : {}"
|
||||
:src="`/examples/${name}?${urlSearchParams}`"
|
||||
width="1024"
|
||||
class="relative left-1/2 -translate-x-1/2"
|
||||
:class="props.class"
|
||||
/>
|
||||
<div v-else class="flex justify-center p-4" :class="props.class">
|
||||
<component :is="camelName" v-bind="{ ...componentProps, ...optionsValues }" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,13 @@ const name = route.params.slug?.[0]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col justify-center items-center h-screen">
|
||||
<div class="example flex flex-col justify-center items-center h-screen">
|
||||
<component :is="name" v-bind="route.query" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.example {
|
||||
--ui-container: 54rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user