Skip to content

Commit

Permalink
enhance: Improve empty tag preview height (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
navorite committed Dec 10, 2023
1 parent 36e1e86 commit a829026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/lib/components/basic/Tag.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
export { className as class };
</script>

<span
<div
style:background-color={bgColor}
style:color={textColor}
class="inline-block h-full w-full max-w-[7rem] cursor-default overflow-hidden overflow-ellipsis whitespace-nowrap rounded-md bg-primary px-1 py-0.5 text-center text-xs font-semibold text-white {className}"
class="flex min-h-full max-w-[7rem] flex-1 cursor-default items-center justify-center rounded-md bg-primary {className}"
use:tooltip={{ title: name }}
>
{name}
</span>
<span
class="overflow-hidden text-ellipsis whitespace-nowrap px-1 py-0.5 text-center text-xs font-semibold text-white"
>{name}</span
>
</div>
2 changes: 1 addition & 1 deletion src/lib/components/options/basic/TagEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</td>
<td>
<Tag
name={addedTag.name || '' }
name={addedTag.name || 'Preview'}
bgColor={addedTag.bgColor}
textColor={addedTag.textColor}
/>
Expand Down

0 comments on commit a829026

Please sign in to comment.