Skip to content

Commit 7ea6424

Browse files
authored
Merge branch 'main' into mp/segmented-control-basic
2 parents c03b4e1 + df26f3c commit 7ea6424

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.changeset/smooth-balloons-hope.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Passthrough ActionList.Group props from NavList.Group

.github/workflows/deploy_preview.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
if: ${{ github.repository == 'primer/react' }}
1313
name: Preview
1414
uses: primer/.github/.github/workflows/deploy_preview.yml@main
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
1519
with:
1620
node_version: 14
1721
install: npm ci && cd docs && npm ci && cd ..

src/NavList/NavList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,14 @@ export type NavListGroupProps = {
240240
title?: string
241241
} & SxProp
242242

243+
const defaultSx = {}
243244
// TODO: ref prop
244-
const Group = ({title, children, sx: sxProp = {}}: NavListGroupProps) => {
245+
const Group: React.VFC<NavListGroupProps> = ({title, children, sx: sxProp = defaultSx, ...props}) => {
245246
return (
246247
<>
247248
{/* Hide divider if the group is the first item in the list */}
248249
<ActionList.Divider sx={{'&:first-child': {display: 'none'}}} />
249-
<ActionList.Group title={title} sx={sxProp}>
250+
<ActionList.Group {...props} title={title} sx={sxProp}>
250251
{children}
251252
</ActionList.Group>
252253
</>

0 commit comments

Comments
 (0)