From f298aa27599da0a7c3c981ceffecc491f69e9ccf Mon Sep 17 00:00:00 2001 From: Matt Obee Date: Thu, 3 Sep 2026 11:47:56 +0100 Subject: [PATCH 1/6] Add linked NavList sub-nav parents Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f4333c6-7280-4a91-b0a0-eefc06ff8b70 --- .changeset/lazy-linked-subnav.md | 5 + packages/react/src/NavList/NavList.docs.json | 8 +- .../src/NavList/NavList.features.stories.tsx | 17 +++ packages/react/src/NavList/NavList.module.css | 20 ++++ packages/react/src/NavList/NavList.test.tsx | 69 +++++++++++ packages/react/src/NavList/NavList.tsx | 110 ++++++++++++++---- 6 files changed, 207 insertions(+), 22 deletions(-) create mode 100644 .changeset/lazy-linked-subnav.md diff --git a/.changeset/lazy-linked-subnav.md b/.changeset/lazy-linked-subnav.md new file mode 100644 index 00000000000..c2ae5e0c8bc --- /dev/null +++ b/.changeset/lazy-linked-subnav.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +NavList: Support linked sub-nav parent items with a separate toggle diff --git a/packages/react/src/NavList/NavList.docs.json b/packages/react/src/NavList/NavList.docs.json index 72258bed5f1..3376dd09627 100644 --- a/packages/react/src/NavList/NavList.docs.json +++ b/packages/react/src/NavList/NavList.docs.json @@ -15,6 +15,7 @@ {"id": "components-navlist-features--with-group-expand"}, {"id": "components-navlist-features--with-group-heading-links"}, {"id": "components-navlist-features--with-inactive-items"}, + {"id": "components-navlist-features--with-linked-sub-nav-parent"}, {"id": "components-navlist-features--with-nested-sub-items"}, {"id": "components-navlist-features--with-next-js-link"}, {"id": "components-navlist-features--with-react-router-link"}, @@ -95,7 +96,7 @@ "name": "href", "type": "string", "defaultValue": "", - "description": "The URL that the item navigates to. `href` is passed to the underlying `` element. If `as` is specified, the component may need different props. If the item contains a sub-nav, the item is rendered as a `