From e89df29f94dbd27f497fdcf9e7aa20367e8b2947 Mon Sep 17 00:00:00 2001 From: Josh Farrant Date: Thu, 22 Aug 2024 12:27:51 +0100 Subject: [PATCH 01/13] replace link lists with ul and li elements --- packages/react/src/SubNav/SubNav.module.css | 10 ++++- .../react/src/SubNav/SubNav.module.css.d.ts | 2 +- packages/react/src/SubNav/SubNav.tsx | 42 +++++++++++-------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/packages/react/src/SubNav/SubNav.module.css b/packages/react/src/SubNav/SubNav.module.css index 3e6068738..13fc53fad 100644 --- a/packages/react/src/SubNav/SubNav.module.css +++ b/packages/react/src/SubNav/SubNav.module.css @@ -46,6 +46,12 @@ display: contents; } +.SubNav__links-overlay { + list-style: none; + margin: 0; + padding: 0; +} + /* * Narrow breakpoint */ @@ -149,6 +155,8 @@ } .SubNav__sub-menu { + list-style: none; + padding: 0; padding-inline-start: var(--base-size-16); } } @@ -232,7 +240,7 @@ .SubNav__link-label::after { content: ''; position: absolute; - bottom: -6px; + bottom: -9px; left: 0; width: 100%; height: 2px; diff --git a/packages/react/src/SubNav/SubNav.module.css.d.ts b/packages/react/src/SubNav/SubNav.module.css.d.ts index a33a9b614..c9a1ecb1e 100644 --- a/packages/react/src/SubNav/SubNav.module.css.d.ts +++ b/packages/react/src/SubNav/SubNav.module.css.d.ts @@ -7,9 +7,9 @@ declare const styles: { readonly "SubNav__action-container": string; readonly "SubNav__sub-menu-icon": string; readonly "SubNav__sub-menu-children": string; + readonly "SubNav__links-overlay": string; readonly "SubNav--open": string; readonly "fade-in": string; - readonly "SubNav__links-overlay": string; readonly "SubNav__links-overlay--open": string; readonly "SubNav__overlay-toggle": string; readonly "SubNav__link": string; diff --git a/packages/react/src/SubNav/SubNav.tsx b/packages/react/src/SubNav/SubNav.tsx index 6be6fcf91..b6c3fd041 100644 --- a/packages/react/src/SubNav/SubNav.tsx +++ b/packages/react/src/SubNav/SubNav.tsx @@ -124,7 +124,7 @@ const _SubNavRoot = memo(({id, children, className, 'data-testid': testId, fullW > {HeadingChild &&
{HeadingChild}
} {LinkChildren.length && ( -
{LinkChildren} {ActionChild &&
{ActionChild}
} -
+ )}