Skip to content

Commit

Permalink
feat(tag): dynamically set size of remove button
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutSarac committed Dec 26, 2024
1 parent 9f3c260 commit 02ebe75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/tag/bl-tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

:host([variant="removeable"]) .remove-button {
--bl-border-radius-m: var(--bl-size-m);
--bl-border-radius-m: var(--bl-border-radius-circle);
}

:host([size="small"]) .tag {
Expand Down
3 changes: 3 additions & 0 deletions src/components/tag/bl-tag.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Tags are available in three sizes: small, medium (default), and large.
<bl-tag size="small">Small</bl-tag>
<bl-tag size="medium">Medium</bl-tag>
<bl-tag size="large">Large</bl-tag>
<bl-tag size="small" variant="removeable">Small Removeable</bl-tag>
<bl-tag size="medium" variant="removeable">Medium Removeable</bl-tag>
<bl-tag size="large" variant="removeable">Large Removeable</bl-tag>
`}
</Story>
</Canvas>
Expand Down
2 changes: 2 additions & 0 deletions src/components/tag/bl-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export default class BlTag extends LitElement {
? html`
<bl-button
icon="close"
size=${this.size === "large" ? "medium" : "small"}
label="Remove"
variant="tertiary"
kind="neutral"
class="remove-button"
Expand Down

0 comments on commit 02ebe75

Please sign in to comment.