From 82c82516e65175bbb4d54c56281a4cea6ee5cc36 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Wed, 15 May 2024 10:26:15 +1000 Subject: [PATCH 1/3] Add the default heading level with the as prop for NAvlist.Group --- packages/react/src/NavList/NavList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react/src/NavList/NavList.tsx b/packages/react/src/NavList/NavList.tsx index 3d75cb700c6..14d934fe28a 100644 --- a/packages/react/src/NavList/NavList.tsx +++ b/packages/react/src/NavList/NavList.tsx @@ -259,7 +259,9 @@ const Group: React.FC = ({title, children, sx: sxProp = defau <> {/* Hide divider if the group is the first item in the list */} - + + {/* Setting up the default value for the heading level. TODO: API update to give flexibility to NavList.Group */} + {title} {children} From 5483a6d79ab0b6075b06f3374cdc464b9cc57f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C4=9Fan?= Date: Wed, 15 May 2024 10:42:00 +1000 Subject: [PATCH 2/3] Create calm-insects-boil.md --- .changeset/calm-insects-boil.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-insects-boil.md diff --git a/.changeset/calm-insects-boil.md b/.changeset/calm-insects-boil.md new file mode 100644 index 00000000000..1aba232fec9 --- /dev/null +++ b/.changeset/calm-insects-boil.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +Update NavList to use the new ActionList.GroupHeading API and Add an "as" prop to specify the heading level as default h3. (No changes expected in the rendered HTML) From 19a4b778d3b6176632c3b95727e2ec1645e43c46 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Wed, 15 May 2024 10:44:05 +1000 Subject: [PATCH 3/3] update the comment --- packages/react/src/NavList/NavList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/NavList/NavList.tsx b/packages/react/src/NavList/NavList.tsx index 14d934fe28a..2da5b8bcef2 100644 --- a/packages/react/src/NavList/NavList.tsx +++ b/packages/react/src/NavList/NavList.tsx @@ -260,7 +260,7 @@ const Group: React.FC = ({title, children, sx: sxProp = defau {/* Hide divider if the group is the first item in the list */} - {/* Setting up the default value for the heading level. TODO: API update to give flexibility to NavList.Group */} + {/* Setting up the default value for the heading level. TODO: API update to give flexibility to NavList.Group title's heading level */} {title} {children}