fix prepend

This commit is contained in:
Mutasem 2022-04-11 12:55:44 +02:00
parent 55877d34f4
commit 960354f42e

View file

@ -1,5 +1,5 @@
<template functional> <template functional>
<div :class="$style.container"> <div :class="{[$style.container]: true, [$style.withPrepend]: !!$slots.prepend}">
<div v-if="$slots.prepend" :class="$style.prepend"> <div v-if="$slots.prepend" :class="$style.prepend">
<slot name="prepend" /> <slot name="prepend" />
</div> </div>
@ -130,15 +130,19 @@ export default {
.container { .container {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
--input-border-color: none; }
border: var(--border-base);
border-radius: var(--input-border-radius, var(--border-radius-base)) .withPrepend {
input {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
} }
.prepend { .prepend {
display: inline-block;
font-size: var(--font-size-2xs); font-size: var(--font-size-2xs);
border-right: var(--border-base); border: var(--border-base);
border-right: none;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 var(--spacing-3xs); padding: 0 var(--spacing-3xs);