Skip to content

Commit b3130b9

Browse files
committed
toast notification
1 parent 27b80de commit b3130b9

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/uui-toast-notification/lib/uui-toast-notification.element.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export class UUIToastNotificationElement extends LitElement {
9191
--uui-button-padding-right-factor: 1.5;
9292
}
9393
94+
:host #toast > div {
95+
background-color: var(--uui-color-surface);
96+
color: var(--uui-color-text);
97+
border-color: var(--uui-color-surface);
98+
}
9499
:host([color='primary']) #toast > div {
95100
background-color: var(--uui-color-primary);
96101
color: var(--uui-color-primary-contrast);
@@ -338,7 +343,8 @@ export class UUIToastNotificationElement extends LitElement {
338343
<div id="close">
339344
<uui-button
340345
.label=${'close'}
341-
.color=${this.color}
346+
?color=${this.color}
347+
.look=${this.color ? 'primary' : 'default'}
342348
@click=${() => (this.open = false)}>
343349
<uui-icon
344350
name="remove"

packages/uui-toast-notification/lib/uui-toast-notification.story.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default {
99
component: 'uui-toast-notification',
1010
args: {
1111
open: true,
12-
color: '',
1312
headline: 'Toast notification layout headline',
1413
slot: 'Message to be displayed, shown by toast notification layout.',
1514
},
@@ -47,7 +46,7 @@ export const ErrorStyle: Story = props => html`<uui-toast-notification
4746
.color=${props.color}>
4847
<uui-toast-notification-layout .headline=${props.headline}>
4948
${props.slot}
50-
<uui-button slot="actions" color="danger">Retry</uui-button>
49+
<uui-button slot="actions" look="primary" color="danger">Retry</uui-button>
5150
</uui-toast-notification-layout>
5251
</uui-toast-notification>`;
5352
ErrorStyle.args = {
@@ -74,7 +73,7 @@ export const PositiveStyle: Story = props => html`<uui-toast-notification
7473
.color=${props.color}>
7574
<uui-toast-notification-layout .headline=${props.headline}>
7675
${props.slot}
77-
<uui-button slot="actions" .color=${props.color}
76+
<uui-button slot="actions" look="primary" .color=${props.color}
7877
>View in browser</uui-button
7978
>
8079
</uui-toast-notification-layout>

0 commit comments

Comments
 (0)