Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/NavList/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,16 @@ const defaultSx = {}
// TODO: ref prop
const Group: React.FC<NavListGroupProps> = ({title, children, sx: sxProp = defaultSx, ...props}) => {
return (
<Box as="li" sx={sxProp} {...props}>
<>
{/* Hide divider if the group is the first item in the list */}
<ActionList.Divider as="div" sx={{'&:first-child': {display: 'none'}}} />
{title && <ActionList.Heading title={title} />}
<Box as="ul" sx={{paddingInlineStart: 0}}>
{children}
<ActionList.Divider sx={{'&:first-child': {display: 'none'}}} />
<Box as="li" sx={sxProp} {...props}>
{title && <ActionList.Heading title={title} />}
<Box as="ul" sx={{paddingInlineStart: 0}}>
{children}
</Box>
</Box>
</Box>
</>
)
}

Expand Down