File tree 2 files changed +26
-18
lines changed
packages/kit/src/lib/components
2 files changed +26
-18
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @svecodocs/kit " : patch
3
+ ---
4
+
5
+ fix: cleanup empty space if no ` defaultValue ` or ` required ` in prop field
Original file line number Diff line number Diff line change 41
41
{@render children ?.()}
42
42
{/if }
43
43
</div >
44
- <div class =" mt-3 flex flex-col gap-2" >
45
- {#if defaultValue }
46
- <div class =" text-muted-foreground flex items-center font-mono" >
47
- <span class =" text-xs" >
48
- default<span class =" text-muted-foreground" >:</span >
49
- </span >
50
- <span class =" text-foreground/90 ml-1 min-w-fit font-mono text-xs" >
51
- {defaultValue }
44
+
45
+ {#if defaultValue || required }
46
+ <div class =" mt-3 flex flex-col gap-2" >
47
+ {#if defaultValue }
48
+ <div class =" text-muted-foreground flex items-center font-mono" >
49
+ <span class =" text-xs" >
50
+ default<span class =" text-muted-foreground" >:</span >
51
+ </span >
52
+ <span class =" text-foreground/90 ml-1 min-w-fit font-mono text-xs" >
53
+ {defaultValue }
54
+ </span >
55
+ </div >
56
+ {/if }
57
+ {#if required }
58
+ <span
59
+ class =" relative mr-auto min-w-fit font-mono text-xs text-red-600 dark:text-red-400"
60
+ >
61
+ required
52
62
</span >
53
- </div >
54
- {/if }
55
- {#if required }
56
- <span
57
- class =" relative mr-auto min-w-fit font-mono text-xs text-red-600 dark:text-red-400"
58
- >
59
- required
60
- </span >
61
- {/if }
62
- </div >
63
+ {/if }
64
+ </div >
65
+ {/if }
63
66
<Separator class =" mt-4" />
64
67
</div >
You can’t perform that action at this time.
0 commit comments