Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectPanel2: Add back button #4288

Merged
merged 13 commits into from
Mar 7, 2024
5 changes: 5 additions & 0 deletions .changeset/fair-sloths-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

experimental/SelectPanel: Add back button
6 changes: 4 additions & 2 deletions packages/react/src/ActionList/Selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const Selection: React.FC<React.PropsWithChildren<SelectionProps>> = ({se
}

if (selectionVariant === 'single' || listRole === 'menu') {
return <LeadingVisualContainer>{selected && <CheckIcon />}</LeadingVisualContainer>
return (
<LeadingVisualContainer data-component="ActionList.Selection">{selected && <CheckIcon />}</LeadingVisualContainer>
)
}

/**
Expand Down Expand Up @@ -59,7 +61,7 @@ export const Selection: React.FC<React.PropsWithChildren<SelectionProps>> = ({se
}

return (
<LeadingVisualContainer>
<LeadingVisualContainer data-component="ActionList.Selection">
<Box
sx={{
borderColor: selected ? 'accent.fg' : 'neutral.emphasis',
Expand Down
Loading
Loading