From 0b2c381dd9743928ab5bb2f2da7a87cda21c223d Mon Sep 17 00:00:00 2001 From: Jose De Freitas Jr Date: Fri, 19 Jul 2024 11:41:03 -0600 Subject: [PATCH 1/3] feat(pie-toast): DSW-2121 remove unnecesary import --- packages/components/pie-toast/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/pie-toast/src/index.ts b/packages/components/pie-toast/src/index.ts index baee0ea5dc..e7de9dfa64 100644 --- a/packages/components/pie-toast/src/index.ts +++ b/packages/components/pie-toast/src/index.ts @@ -9,7 +9,6 @@ import { import { property, query } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; import { RtlMixin, defineCustomElement, dispatchCustomEvent } from '@justeattakeaway/pie-webc-core'; -import '@justeattakeaway/pie-toast'; import '@justeattakeaway/pie-icon-button'; import '@justeattakeaway/pie-icons-webc/dist/IconClose.js'; import '@justeattakeaway/pie-icons-webc/dist/IconPlaceholder.js'; From fa2537a05539c8f53645ee76f9138aca58965505 Mon Sep 17 00:00:00 2001 From: Jose De Freitas Jr Date: Fri, 19 Jul 2024 11:46:15 -0600 Subject: [PATCH 2/3] feat(pie-toast): DSW-2121 refactor css by removing nesting --- packages/components/pie-toast/src/toast.scss | 70 ++++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/components/pie-toast/src/toast.scss b/packages/components/pie-toast/src/toast.scss index ae221669f6..ac9bfd747d 100644 --- a/packages/components/pie-toast/src/toast.scss +++ b/packages/components/pie-toast/src/toast.scss @@ -23,49 +23,49 @@ color: var(--toast-font-color); font-size: var(--toast-font-size); line-height: var(--toast-line-height); +} - & .c-toast-contentArea{ - display: flex; - gap: var(--dt-spacing-b); - justify-content: space-between; - } +.c-toast-contentArea { + display: flex; + gap: var(--dt-spacing-b); + justify-content: space-between; +} - & .c-toast-messageArea { - display: flex; - align-items: center; - gap: var(--dt-spacing-b); - padding: calc(var(--dt-spacing-03) / 2) 0; +.c-toast-messageArea { + display: flex; + align-items: center; + gap: var(--dt-spacing-b); + padding: calc(var(--dt-spacing-03) / 2) 0; - span { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } + span { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } - & .is-multiline { - align-items: flex-start; + &.is-multiline { + align-items: flex-start; - span { - max-height: 60px; - white-space: inherit; + span { + max-height: 60px; + white-space: inherit; - // text-overflow: ellipsis; for multiline lines only works using webkit prefix - /* stylelint-disable */ - display: -webkit-box; - /* stylelint-enable */ - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - } + // text-overflow: ellipsis; for multiline lines only works using webkit prefix + /* stylelint-disable */ + display: -webkit-box; + /* stylelint-enable */ + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; } } +} - & .c-toast-actionsArea { - display: flex; - gap: var(--dt-spacing-b); - } +.c-toast-actionsArea { + display: flex; + gap: var(--dt-spacing-b); +} - & .c-toast-footer { - display: flex; - justify-content: flex-end; - } +.c-toast-footer { + display: flex; + justify-content: flex-end; } From e33bdf1b5325ef92699ca0f24a98cbba280ec015 Mon Sep 17 00:00:00 2001 From: Jose De Freitas Jr Date: Fri, 19 Jul 2024 12:58:04 -0600 Subject: [PATCH 3/3] feat(pie-toast): DSW-2121 removed imports --- apps/pie-storybook/stories/pie-toast.stories.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/pie-storybook/stories/pie-toast.stories.ts b/apps/pie-storybook/stories/pie-toast.stories.ts index 44e9841619..710e0aa54e 100644 --- a/apps/pie-storybook/stories/pie-toast.stories.ts +++ b/apps/pie-storybook/stories/pie-toast.stories.ts @@ -1,11 +1,6 @@ import { html } from 'lit'; - -/* eslint-disable import/no-duplicates */ -import '@justeattakeaway/pie-toast'; import { ToastProps, defaultProps } from '@justeattakeaway/pie-toast'; import { action } from '@storybook/addon-actions'; -/* eslint-enable import/no-duplicates */ - import { type StoryMeta } from '../types'; import { createStory } from '../utilities';