Skip to content

Commit eaabbf8

Browse files
committed
fix: fixed slot padding in input
1 parent c07980e commit eaabbf8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/LibInput/LibInput.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,18 @@
7070
dark:border-neutral-600
7171
border-neutral-400
7272
`,
73-
/* ($slots.left || $slots.right) && */`px-2`,
73+
$slots.left && `pl-2`,
74+
$slots.right && `pr-2`,
75+
76+
/* ($slots.left || $slots.right) && `px-2`*/
7477
innerWrapperAttrs.class
7578
)"
7679
>
7780
<slot name="left" v-bind="slotProps"/>
7881
<slot name="input" v-bind="{ ...inputProps, ...slotProps, suggestionsIndicatorClickHandler }">
7982
<lib-simple-input
8083
:id="id"
81-
:class="twMerge(`p-0`, $attrs.class)"
84+
:class="twMerge(`p-0`, !$slots.left && `pl-2`, !$slots.right && `pr-2`, $attrs.class)"
8285
v-bind="inputProps"
8386
/>
8487
</slot>

0 commit comments

Comments
 (0)