Lib: Refactor Input component borders

This commit is contained in:
2025-03-15 00:28:06 +01:00
parent 3eab329b42
commit 0642a6c0e2

View File

@ -14,6 +14,7 @@
/** The type of the input element, e.g. "text". */
type?: string;
/** An optional element at the end of the input group */
tail?: Snippet;
}
@ -29,12 +30,12 @@
<div class="input-group input-group-divider grid-cols-[auto_1fr_auto]">
<div
class="input-group-shim select-none text-nowrap border-r text-neutral-900"
class="input-group-shim select-none text-nowrap text-neutral-900"
style="width: {labelwidth};"
>
{@render children()}
</div>
<input bind:value class="!outline-none" {type} {...restProps} />
<input bind:value class="{tail ? '!border-r' : ''} !border-l" {type} {...restProps} />
{#if tail}
{@render tail()}
{/if}