From 1afddfa4f2699389e736c6554d1945e19016516b Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Tue, 28 Nov 2023 22:53:41 +0100 Subject: [PATCH 01/26] refactor: updated components to be functional for website redesign --- components/Common/Breadcrumbs/index.tsx | 5 +- components/Common/MetaBar/index.module.css | 12 ++- components/Common/MetaBar/index.tsx | 12 +-- .../NavItem/index.module.css | 0 .../NavItem/index.stories.tsx | 2 +- .../{Containers => Common}/NavItem/index.tsx | 1 + components/Common/Select/index.module.css | 6 +- components/Common/Select/index.stories.tsx | 97 ++++++++++--------- components/Common/Select/index.tsx | 80 +++++++++------ .../Sidebar/SidebarGroup/index.module.css | 1 + .../Common/Sidebar/SidebarGroup/index.tsx | 19 +--- .../Sidebar/SidebarItem/index.module.css | 16 ++- .../Common/Sidebar/SidebarItem/index.tsx | 23 ++--- components/Common/Sidebar/index.module.css | 15 ++- components/Common/Sidebar/index.stories.tsx | 78 --------------- components/Common/Sidebar/index.tsx | 52 +++++++--- components/Containers/Footer/index.tsx | 2 +- .../index.module.css | 0 .../index.stories.tsx | 20 ++-- .../{NavigationBar => NavBar}/index.tsx | 36 ++++--- components/Downloads/DownloadList.tsx | 8 +- components/SideNavigation.tsx | 14 +-- components/TopNavigation.tsx | 8 +- components/withLayout.tsx | 63 +++++++----- 24 files changed, 288 insertions(+), 282 deletions(-) rename components/{Containers => Common}/NavItem/index.module.css (100%) rename components/{Containers => Common}/NavItem/index.stories.tsx (92%) rename components/{Containers => Common}/NavItem/index.tsx (98%) rename components/Containers/{NavigationBar => NavBar}/index.module.css (100%) rename components/Containers/{NavigationBar => NavBar}/index.stories.tsx (64%) rename components/Containers/{NavigationBar => NavBar}/index.tsx (84%) diff --git a/components/Common/Breadcrumbs/index.tsx b/components/Common/Breadcrumbs/index.tsx index 512e89c279809..9e05c0b7e7d36 100644 --- a/components/Common/Breadcrumbs/index.tsx +++ b/components/Common/Breadcrumbs/index.tsx @@ -6,9 +6,10 @@ import BreadcrumbItem from '@/components/Common/Breadcrumbs/BreadcrumbItem'; import BreadcrumbLink from '@/components/Common/Breadcrumbs/BreadcrumbLink'; import BreadcrumbRoot from '@/components/Common/Breadcrumbs/BreadcrumbRoot'; import BreadcrumbTruncatedItem from '@/components/Common/Breadcrumbs/BreadcrumbTruncatedItem'; +import type { FormattedMessage } from '@/types'; type BreadcrumbLink = { - label: string; + label: FormattedMessage; href: LinkProps['href']; }; @@ -38,7 +39,7 @@ const Breadcrumbs: FC = ({ return (