Skip to content

Commit

Permalink
render the group heading sub component if title exists (#4614)
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed May 21, 2024
1 parent 9c01a93 commit f293344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/NavList/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const Group: React.FC<NavListGroupProps> = ({title, children, sx: sxProp = defau
<ActionList.Divider sx={{'&:first-child': {display: 'none'}}} />
<ActionList.Group {...props} sx={sxProp}>
{/* Setting up the default value for the heading level. TODO: API update to give flexibility to NavList.Group title's heading level */}
<ActionList.GroupHeading as="h3">{title}</ActionList.GroupHeading>
{title ? <ActionList.GroupHeading as="h3">{title}</ActionList.GroupHeading> : null}
{children}
</ActionList.Group>
</>
Expand Down

0 comments on commit f293344

Please sign in to comment.