Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
5 changes: 5 additions & 0 deletions .changeset/wicked-knives-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix: `ButtonGroup` borders show incorrectly on hover
12 changes: 3 additions & 9 deletions src/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,23 @@ const ButtonGroup = styled.div`
isolation: isolate;

&& > * {
margin-inline-end: -1px;
position: relative;
border-right-width: 0;
border-radius: 0;

:first-child {
border-top-left-radius: ${get('radii.2')};
border-bottom-left-radius: ${get('radii.2')};
margin-right: 0;
}

:not(:first-child) {
margin-left: 0;
margin-right: 0;
}

:last-child {
border-right-width: 1px;
border-top-right-radius: ${get('radii.2')};
border-bottom-right-radius: ${get('radii.2')};
}

:focus,
:active {
:active,
:hover {
z-index: 1;
}
}
Expand Down