Skip to content

Commit 1b8cbcb

Browse files
committed
badge
1 parent a68b222 commit 1b8cbcb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/uui-badge/lib/uui-badge.element.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export class UUIBadgeElement extends LitElement {
3232
box-sizing: border-box;
3333
3434
border-radius: var(--uui-size-4);
35+
36+
color: var(--uui-color-primary-standalone);
37+
background-color: var(--uui-color-surface-alt);
3538
}
3639
3740
:host([color='primary']) {
@@ -93,12 +96,12 @@ export class UUIBadgeElement extends LitElement {
9396

9497
/**
9598
* Changes the look of the badge to one of the predefined, symbolic looks. For example - set this to positive if you want nice, green "confirm" badge.
96-
* @type {"primary"|"positive"|"warning"|"danger"}
99+
* @type {"" | "primary"|"positive"|"warning"|"danger"}
97100
* @attr
98101
* @default primary
99102
*/
100103
@property({ type: String, reflect: true })
101-
color = 'primary';
104+
color = '';
102105

103106
/**
104107
* Bring attention to this badge by applying a bounce animation.

packages/uui-badge/lib/uui-badge.story.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ OnButton.parameters = {
131131
},
132132
};
133133

134-
export const LooksAndColors: Story = () => html`
134+
export const Colors: Story = () => html`
135+
<div
136+
style="position:relative; width:80px; height:80px; border: 2px dashed black">
137+
<uui-badge>default/undefined</uui-badge>
138+
</div>
135139
<div
136140
style="position:relative; width:80px; height:80px; border: 2px dashed black">
137141
<uui-badge color="primary">primary</uui-badge>

0 commit comments

Comments
 (0)