From 928646c60ea9d7dd3bf69d5d83170f6da1e6a935 Mon Sep 17 00:00:00 2001 From: Yusuf Yusuf Date: Tue, 30 Jul 2024 16:35:39 +0100 Subject: [PATCH] Moved Banner --- .../__snapshots__/banner.test.tsx.snap | 0 .../banner/__tests__/banner.test.tsx | 0 .../banner}/assets/CloseIconBlack.tsx | 0 .../components/banner}/assets/EmailIcon.tsx | 0 .../src/components}/banner/banner.stories.mdx | 2 +- .../src/components}/banner/banner.tsx | 3 +- .../src/components}/banner/styles.ts | 0 packages/ts-components/src/index.ts | 1 + .../__snapshots__/index.test.tsx.snap | 34 ------------------- packages/ts-newskit/src/assets/index.tsx | 2 -- packages/ts-newskit/src/index.ts | 1 - packages/ts-newskit/tsconfig.json | 8 +++-- 12 files changed, 10 insertions(+), 41 deletions(-) rename packages/{ts-newskit/src/components/misc => ts-components/src/components}/banner/__tests__/__snapshots__/banner.test.tsx.snap (100%) rename packages/{ts-newskit/src/components/misc => ts-components/src/components}/banner/__tests__/banner.test.tsx (100%) rename packages/{ts-newskit/src => ts-components/src/components/banner}/assets/CloseIconBlack.tsx (100%) rename packages/{ts-newskit/src => ts-components/src/components/banner}/assets/EmailIcon.tsx (100%) rename packages/{ts-newskit/src/components/misc => ts-components/src/components}/banner/banner.stories.mdx (98%) rename packages/{ts-newskit/src/components/misc => ts-components/src/components}/banner/banner.tsx (89%) rename packages/{ts-newskit/src/components/misc => ts-components/src/components}/banner/styles.ts (100%) diff --git a/packages/ts-newskit/src/components/misc/banner/__tests__/__snapshots__/banner.test.tsx.snap b/packages/ts-components/src/components/banner/__tests__/__snapshots__/banner.test.tsx.snap similarity index 100% rename from packages/ts-newskit/src/components/misc/banner/__tests__/__snapshots__/banner.test.tsx.snap rename to packages/ts-components/src/components/banner/__tests__/__snapshots__/banner.test.tsx.snap diff --git a/packages/ts-newskit/src/components/misc/banner/__tests__/banner.test.tsx b/packages/ts-components/src/components/banner/__tests__/banner.test.tsx similarity index 100% rename from packages/ts-newskit/src/components/misc/banner/__tests__/banner.test.tsx rename to packages/ts-components/src/components/banner/__tests__/banner.test.tsx diff --git a/packages/ts-newskit/src/assets/CloseIconBlack.tsx b/packages/ts-components/src/components/banner/assets/CloseIconBlack.tsx similarity index 100% rename from packages/ts-newskit/src/assets/CloseIconBlack.tsx rename to packages/ts-components/src/components/banner/assets/CloseIconBlack.tsx diff --git a/packages/ts-newskit/src/assets/EmailIcon.tsx b/packages/ts-components/src/components/banner/assets/EmailIcon.tsx similarity index 100% rename from packages/ts-newskit/src/assets/EmailIcon.tsx rename to packages/ts-components/src/components/banner/assets/EmailIcon.tsx diff --git a/packages/ts-newskit/src/components/misc/banner/banner.stories.mdx b/packages/ts-components/src/components/banner/banner.stories.mdx similarity index 98% rename from packages/ts-newskit/src/components/misc/banner/banner.stories.mdx rename to packages/ts-components/src/components/banner/banner.stories.mdx index 20b7e7934d0..e87eff70352 100644 --- a/packages/ts-newskit/src/components/misc/banner/banner.stories.mdx +++ b/packages/ts-components/src/components/banner/banner.stories.mdx @@ -27,4 +27,4 @@ export const BannerStory = ({ group }) => ( {BannerStory.bind({})} - \ No newline at end of file + diff --git a/packages/ts-newskit/src/components/misc/banner/banner.tsx b/packages/ts-components/src/components/banner/banner.tsx similarity index 89% rename from packages/ts-newskit/src/components/misc/banner/banner.tsx rename to packages/ts-components/src/components/banner/banner.tsx index 14fb576f91d..34786a7213e 100644 --- a/packages/ts-newskit/src/components/misc/banner/banner.tsx +++ b/packages/ts-components/src/components/banner/banner.tsx @@ -9,7 +9,8 @@ import { BannerWrapper, BannerContentWrapper } from './styles'; -import { CloseIconBlack, EmailIcon } from '../../../assets'; +import CloseIconBlack from './assets/CloseIconBlack'; +import EmailIcon from './assets/EmailIcon'; type Props = { onClose: () => void; diff --git a/packages/ts-newskit/src/components/misc/banner/styles.ts b/packages/ts-components/src/components/banner/styles.ts similarity index 100% rename from packages/ts-newskit/src/components/misc/banner/styles.ts rename to packages/ts-components/src/components/banner/styles.ts diff --git a/packages/ts-components/src/index.ts b/packages/ts-components/src/index.ts index b6cac729d28..93e256c0be2 100644 --- a/packages/ts-components/src/index.ts +++ b/packages/ts-components/src/index.ts @@ -106,3 +106,4 @@ export { default as safeDecodeURIComponent } from './utils/safeDecodeURIComponent'; export { ArticleSidebar } from './components/article-sidebar/ArticleSidebar'; +export { Banner } from './components/banner/banner'; diff --git a/packages/ts-newskit/src/assets/__tests__/__snapshots__/index.test.tsx.snap b/packages/ts-newskit/src/assets/__tests__/__snapshots__/index.test.tsx.snap index a463f7d8ef9..7f379c74a54 100644 --- a/packages/ts-newskit/src/assets/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/ts-newskit/src/assets/__tests__/__snapshots__/index.test.tsx.snap @@ -15,40 +15,6 @@ exports[`Icons Component: BreadcrumbIcon BreadcrumbIcon renders with default pro `; -exports[`Icons Component: CloseIconBlack CloseIconBlack renders with default props 1`] = ` - - - - - -`; - -exports[`Icons Component: EmailIcon EmailIcon renders with default props 1`] = ` - - - - - -`; - exports[`Icons Component: FilledArrowIcon FilledArrowIcon renders with default props 1`] = `