Skip to content

Commit

Permalink
clean up styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rossedfort committed Sep 26, 2024
1 parent bca9bd5 commit 7e3be5c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/lib/holocene/combobox/combobox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,7 @@
{#if leadingIcon}
<Icon width={20} height={20} class="ml-2 shrink-0" name={leadingIcon} />
{/if}
<div
class="flex w-full flex-wrap items-center"
class:gap-2={multiselect}
class:py-1={multiselect}
>
<div class="input-wrapper" class:multiselect>
{#if multiselect && isArrayValue(value) && value.length > 0}
{#if displayChips}
{#each value.slice(0, chipLimit) as v}
Expand Down Expand Up @@ -469,7 +465,7 @@

<style lang="postcss">
.combobox-wrapper {
@apply surface-primary flex w-full flex-row items-center gap-2 rounded-lg border-2 border-subtle text-sm dark:focus-within:surface-primary focus-within:border-interactive focus-within:outline-none focus-within:ring-4 focus-within:ring-primary/70;
@apply surface-primary flex w-full flex-row items-center rounded-lg border-2 border-subtle text-sm dark:focus-within:surface-primary focus-within:border-interactive focus-within:outline-none focus-within:ring-4 focus-within:ring-primary/70;
&.invalid {
@apply border-2 border-danger text-danger focus-within:ring-danger/70;
Expand All @@ -484,6 +480,14 @@
@apply text-xs text-danger;
}
.input-wrapper {
@apply ml-2 flex w-full flex-wrap items-center;
&.multiselect {
@apply gap-1 py-1;
}
}
.combobox-input {
@apply flex h-10 grow bg-transparent text-primary placeholder:text-secondary focus:outline-none;
}
Expand Down

0 comments on commit 7e3be5c

Please sign in to comment.