Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom properties to uui-tag #791

Merged
merged 2 commits into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/uui-tag/lib/uui-tag.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import {
* @description Tag component from Umbraco UI components library. Comes in one shape, but different looks and sizes
* @slot - slot for tag contents
* @cssprop --uui-tag-font-size - overwrite the default font-size for the tag.
* @cssprop --uui-tag-padding - overwrite the default padding size for the tag.
* @cssprop --uui-tag-border-radius - overwrite the default border-radius for the tag.
* @cssprop --uui-tag-border-color - overwrite the default border color for the tag.
*/

@defineElement('uui-tag')
Expand Down Expand Up @@ -45,11 +48,11 @@ export class UUITagElement extends LitElement {
font-size: var(--uui-tag-font-size, var(--uui-type-small-size));
font-weight: 700;
line-height: 1;
padding: var(--uui-size-space-1) calc(var(--uui-size-space-1) + 0.5em);
padding: var(--uui-tag-padding, var(--uui-size-space-1) calc(var(--uui-size-space-1) + 0.5em));
border-radius: 100px;
user-select: none;
border-radius: var(--uui-size-4);
border: 1px solid transparent;
border-radius: var(--uui-tag-border-radius, var(--uui-size-4));
border: 1px solid var(--uui-tag-border-color, transparent);
}

slot {
Expand Down
Loading