Skip to content

Commit

Permalink
feat(pie-toast): DSW-2121 refactor css classes
Browse files Browse the repository at this point in the history
  • Loading branch information
thejfreitas committed Jul 9, 2024
1 parent 6c81c95 commit f200105
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 3 additions & 5 deletions packages/components/pie-toast/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export class PieToast extends RtlMixin(LitElement) implements ToastProps {
size="xsmall"
aria-label="${ariaLabel || nothing}"
@click="${() => this.handleActionClick()}"
class="${componentSelector}-leading-action"
data-test-id="${componentSelector}-leading-action"
type="button">
${text}
Expand Down Expand Up @@ -186,7 +185,6 @@ export class PieToast extends RtlMixin(LitElement) implements ToastProps {
<pie-icon-button
variant="ghost-inverse"
size="xsmall"
class="${componentClass}-close"
data-test-id="${componentSelector}-close"
@click="${this.closeToastComponent}">
<icon-close></icon-close>
Expand Down Expand Up @@ -237,12 +235,12 @@ export class PieToast extends RtlMixin(LitElement) implements ToastProps {

return html`
<div data-test-id="${componentSelector}" class="${componentClass}">
<div class="${componentClass}-content-area">
<div class="${componentClass}-message-area" ?isMultiline="${isMultiline}">
<div class="${componentClass}-contentArea">
<div class="${componentClass}-messageArea" ?isMultiline="${isMultiline}">
<icon-placeholder size="s"></icon-placeholder>
${message === '' ? nothing : this.renderMessage(message, _messageAreaMaxWidth)}
</div>
<div class="${componentClass}-actions-area">
<div class="${componentClass}-actionsArea">
${!isMultiline && leadingAction?.text ? this.renderActionButton(leadingAction) : nothing}
${isDismissible ? this.renderCloseButton() : nothing}
</div>
Expand Down
9 changes: 4 additions & 5 deletions packages/components/pie-toast/src/toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
font-size: var(--toast-font-size);
line-height: var(--toast-line-height);

&-content-area{
& .c-toast-contentArea{
display: flex;
gap: var(--dt-spacing-b);
justify-content: space-between;

}

&-message-area {
& .c-toast-messageArea {
display: flex;
align-items: center;
gap: var(--dt-spacing-b);
Expand Down Expand Up @@ -60,12 +59,12 @@
}
}

&-actions-area {
& .c-toast-actionsArea {
display: flex;
gap: var(--dt-spacing-b);
}

&-footer {
& .c-toast-footer {
display: flex;
justify-content: flex-end;
}
Expand Down

0 comments on commit f200105

Please sign in to comment.