feat: navbar ui update

This commit is contained in:
Timothy J. Baek 2024-03-29 17:20:07 -07:00
parent ce20f05ef1
commit 0c367412c3
14 changed files with 408 additions and 152 deletions

View file

@ -8,7 +8,7 @@
export let addTag: Function;
</script>
<div class="flex flex-row space-x-0.5 line-clamp-1">
<div class="flex flex-row flex-wrap gap-0.5 line-clamp-1">
<TagList
{tags}
on:delete={(e) => {
@ -17,6 +17,7 @@
/>
<TagInput
label={tags.length == 0 ? 'Add Tags' : ''}
on:add={(e) => {
addTag(e.detail);
}}

View file

@ -5,6 +5,7 @@
const i18n = getContext('i18n');
export let label = '';
let showTagInput = false;
let tagName = '';
@ -34,7 +35,7 @@
</button>
<input
bind:value={tagName}
class=" pl-2 cursor-pointer self-center text-xs h-fit bg-transparent outline-none line-clamp-1 w-[8rem]"
class=" pl-2 cursor-pointer self-center text-xs h-fit bg-transparent outline-none line-clamp-1 w-[5.5rem]"
placeholder={$i18n.t('Add a tag')}
list="tagOptions"
on:keydown={(event) => {
@ -71,4 +72,8 @@
</svg>
</div>
</button>
{#if label && !showTagInput}
<span class="text-xs pl-1.5 self-center">{label}</span>
{/if}
</div>

View file

@ -7,7 +7,7 @@
{#each tags as tag}
<div
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-800 dark:text-white"
>
<div class=" text-[0.7rem] font-medium self-center line-clamp-1">
{tag.name}

View file

@ -29,6 +29,6 @@
});
</script>
<div bind:this={tooltipElement} aria-label={content}>
<div bind:this={tooltipElement} aria-label={content} class="flex">
<slot />
</div>