Skip to content

Commit 405dc26

Browse files
committed
refac
1 parent fe681ab commit 405dc26

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/lib/components/common/Tags.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
};
2020
</script>
2121

22-
<div class="flex flex-wrap items-center gap-1.5 w-full">
22+
<div class="flex flex-wrap items-center gap-1 w-full">
2323
<TagList
2424
{tags}
2525
on:delete={(e) => {
@@ -29,8 +29,10 @@
2929

3030
<input
3131
bind:value={inputValue}
32-
class="flex-1 min-w-24 px-1 text-xs bg-transparent outline-hidden placeholder:text-gray-400 dark:placeholder:text-gray-500"
33-
placeholder={$i18n.t('Type to add tag...')}
32+
class="flex-1 min-w-24 {tags.length > 0
33+
? 'px-0.5'
34+
: ''} text-xs bg-transparent outline-hidden placeholder:text-gray-400 dark:placeholder:text-gray-500"
35+
placeholder={$i18n.t('Add a tag...')}
3436
on:keydown={(event) => {
3537
if (event.key === 'Enter' || event.key === ' ') {
3638
event.preventDefault();

src/lib/components/common/Tags/TagItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{#if tag}
1313
<button
1414
type="button"
15-
class="flex items-center gap-0.5 px-1.5 py-[1px] rounded-lg bg-gray-500/20 text-gray-700 dark:text-gray-200 text-xs font-medium hover:bg-gray-500/30 transition-colors"
15+
class="flex items-center gap-1 px-1.5 py-[1px] rounded-full bg-gray-100/50 dark:bg-gray-800/50 border border-gray-100 dark:border-gray-800 text-gray-600 dark:text-gray-300 text-xs font-medium hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
1616
on:click={() => {
1717
onDelete();
1818
}}

0 commit comments

Comments
 (0)