Skip to content

Commit

Permalink
Add the default heading level with the as prop for NAvlist.Group
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed May 15, 2024
1 parent 4ecbe1a commit 82c8251
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react/src/NavList/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ const Group: React.FC<NavListGroupProps> = ({title, children, sx: sxProp = defau
<>
{/* Hide divider if the group is the first item in the list */}
<ActionList.Divider sx={{'&:first-child': {display: 'none'}}} />
<ActionList.Group {...props} title={title} sx={sxProp}>
<ActionList.Group {...props} sx={sxProp}>
{/* Setting up the default value for the heading level. TODO: API update to give flexibility to NavList.Group */}
<ActionList.GroupHeading as="h3">{title}</ActionList.GroupHeading>
{children}
</ActionList.Group>
</>
Expand Down

0 comments on commit 82c8251

Please sign in to comment.