@@ -17,6 +17,10 @@ const props = defineProps({
1717 type: Function as PropType <(props : Record <string , unknown >) => void >,
1818 required: true ,
1919 },
20+ hideTitle: {
21+ type: Boolean ,
22+ default: false ,
23+ },
2024})
2125
2226const { host } = useStudio ()
@@ -119,11 +123,14 @@ function normalizePropsTree(tree: FormTree): FormTree {
119123
120124<template >
121125 <div
122- class =" p-4 min-w-[400px] max-w-[500px] not-prose overflow-y-auto max-h-[400px] relative"
126+ class =" p-3 min-w-[400px] max-w-[500px] not-prose overflow-y-auto max-h-[400px] relative"
123127 @click.stop
124128 >
125129 <!-- Header -->
126- <div class =" text-sm font-mono font-semibold text-highlighted mb-4" >
130+ <div
131+ v-if =" !hideTitle"
132+ class =" text-sm font-mono font-semibold text-highlighted mb-2"
133+ >
127134 {{ titleCase(componentName).replace(/^U /, '') }} properties
128135 </div >
129136
@@ -145,8 +152,8 @@ function normalizePropsTree(tree: FormTree): FormTree {
145152 <div class =" w-2/3 flex items-center gap-2" >
146153 <!-- Nested form overlay for arrays/objects -->
147154 <template v-if =" nestedForm ?.key === prop .key " >
148- <div class =" fixed inset-0 bg-default z-50 flex flex-col p-4 overflow-y-auto rounded-lg" >
149- <div class =" flex items-center justify-between mb-4 " >
155+ <div class =" fixed inset-0 bg-default z-50 flex flex-col p-3 overflow-y-auto rounded-lg" >
156+ <div class =" flex items-center justify-between mb-2 " >
150157 <span class =" text-sm font-mono font-semibold text-highlighted" >
151158 {{ prop.title }}
152159 </span >
@@ -202,6 +209,7 @@ function normalizePropsTree(tree: FormTree): FormTree {
202209 <USwitch
203210 :model-value =" Boolean(prop.value)"
204211 :disabled =" prop.disabled"
212+ size =" xs"
205213 @update:model-value =" updateProp(key, $event)"
206214 />
207215 </template >
@@ -213,7 +221,7 @@ function normalizePropsTree(tree: FormTree): FormTree {
213221 :items =" prop.options"
214222 :disabled =" prop.disabled"
215223 class =" w-full"
216- size =" sm "
224+ size =" xs "
217225 @update:model-value =" updateProp(key, $event)"
218226 />
219227 </template >
@@ -226,7 +234,7 @@ function normalizePropsTree(tree: FormTree): FormTree {
226234 :placeholder =" getPlaceholder(prop)"
227235 :disabled =" prop.disabled"
228236 class =" w-full"
229- size =" sm "
237+ size =" xs "
230238 @update:model-value =" updateProp(key, $event)"
231239 />
232240 </template >
@@ -238,7 +246,7 @@ function normalizePropsTree(tree: FormTree): FormTree {
238246 :placeholder =" getPlaceholder(prop)"
239247 :disabled =" prop.disabled"
240248 class =" w-full"
241- size =" sm "
249+ size =" xs "
242250 @update:model-value =" updateProp(key, $event)"
243251 />
244252 </template >
0 commit comments