Skip to content

Commit

Permalink
refine label style
Browse files Browse the repository at this point in the history
  • Loading branch information
Jicheng Lu committed Mar 11, 2024
1 parent dc35d20 commit 8897e9e
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions src/lib/common/Label.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
</script>

<div class={`label-container ${className}`} style={`${style}`}>
<button class="btn btn-primary btn-rounded btn-sm label-btn">
<span class="d-none d-sm-inline-block me-2">
{text}
</span>
<i
class="mdi mdi-window-close label-close"
role="button"
tabindex="0"
on:keydown={() => {}}
on:click={(e) => handleClose(e, index)}
/>
<button class="btn btn-primary btn-sm label-btn">
<div style="display: flex;">
<span class="d-none d-sm-inline-block me-2 label-text">
{text}
</span>
<i
class="mdi mdi-window-close label-close"
role="button"
tabindex="0"
on:keydown={() => {}}
on:click={(e) => handleClose(e, index)}
/>
</div>
</button>
</div>

Expand All @@ -46,9 +48,16 @@
.label-btn {
cursor: default;
font-size: 12px;
border-radius: 15px;
}
.label-text {
text-align: left;
}
.label-close {
cursor: pointer;
display: flex;
align-items: center;
}
</style>

0 comments on commit 8897e9e

Please sign in to comment.