From bb6d827c59c68b8f3e7b85893e9a9cbbff77ae16 Mon Sep 17 00:00:00 2001 From: bsahitya Date: Tue, 6 Aug 2024 17:53:05 -0500 Subject: [PATCH] feat(header): pass title link as a prop --- .../src/lib/components/Footer/index.tsx | 2 +- .../lib/components/Footer/styles.module.scss | 22 ++++--- .../lib/components/Header/Header.stories.tsx | 1 + .../src/lib/components/Header/index.tsx | 63 +++++++++++-------- .../lib/components/Header/styles.module.scss | 2 +- 5 files changed, 51 insertions(+), 39 deletions(-) diff --git a/libs/react-components/src/lib/components/Footer/index.tsx b/libs/react-components/src/lib/components/Footer/index.tsx index 855ceee..52e3b44 100644 --- a/libs/react-components/src/lib/components/Footer/index.tsx +++ b/libs/react-components/src/lib/components/Footer/index.tsx @@ -163,7 +163,7 @@ const Footer: React.FC = ({ diff --git a/libs/react-components/src/lib/components/Footer/styles.module.scss b/libs/react-components/src/lib/components/Footer/styles.module.scss index fdd3bcc..185c51d 100644 --- a/libs/react-components/src/lib/components/Footer/styles.module.scss +++ b/libs/react-components/src/lib/components/Footer/styles.module.scss @@ -24,6 +24,7 @@ .footerLinkTitle { color: var(--td-web-primary-navy); + font-size: 18px; font-weight: 600; line-height: 28px; position: relative; @@ -62,9 +63,10 @@ } .socialLinksList { - display: grid; - grid-template-columns: repeat(3, 0fr); + display: flex; + flex-wrap: wrap; gap: 1rem 0.75rem; + padding-top: 1rem; } .legalLinksWrapper { @@ -107,12 +109,6 @@ color: var(--td-web-primary-navy); font-family: Inter, sans-serif; -webkit-font-smoothing: antialiased; - - ul { - list-style: none; - margin: 0; - padding: 0; - } } .linksOfInterest { @@ -132,6 +128,12 @@ font-size: 14px; } +ul { + list-style: none; + margin: 0; + padding: 0; +} + @media screen and (min-width: 768px) { .footer { padding: 60px 0 40px; @@ -191,7 +193,7 @@ .footerLinkTitle { pointer-events: all; - + font-size: 1rem; padding: 1rem 0; display: flex; align-items: center; @@ -212,7 +214,7 @@ } .socialLinksList { - grid-template-columns: repeat(4, 1fr); + max-width: 215px; } .socialLinksWrapper { diff --git a/libs/react-components/src/lib/components/Header/Header.stories.tsx b/libs/react-components/src/lib/components/Header/Header.stories.tsx index d57e2ae..a1e156f 100644 --- a/libs/react-components/src/lib/components/Header/Header.stories.tsx +++ b/libs/react-components/src/lib/components/Header/Header.stories.tsx @@ -15,6 +15,7 @@ const meta = { }, args: { title: 'Developers', + titleLink: 'https://developers.teradata.com/', navItems: [ { href: 'test', diff --git a/libs/react-components/src/lib/components/Header/index.tsx b/libs/react-components/src/lib/components/Header/index.tsx index e5ecb93..0bc7954 100644 --- a/libs/react-components/src/lib/components/Header/index.tsx +++ b/libs/react-components/src/lib/components/Header/index.tsx @@ -26,6 +26,10 @@ interface HeaderProps { * Title of the header, displayed after the brand image */ title: string; + /** + * Link associated with the title of the header + */ + titleLink: string; /** * Nav items to be displayed in the navbar */ @@ -54,6 +58,7 @@ interface HeaderProps { const Header: React.FC = ({ title, + titleLink = '', navItems = [], languages, headerActions, @@ -141,7 +146,7 @@ const Header: React.FC = ({
  • - + Teradata.com
  • @@ -158,20 +163,21 @@ const Header: React.FC = ({