Skip to content

Commit 5e1ed83

Browse files
langermankjonrohanfrancineluccahussam-i-am
authored
Add gap between ActionList label and trailingVisual (#6177)
Co-authored-by: Jon Rohan <[email protected]> Co-authored-by: Marie Lucca <[email protected]> Co-authored-by: Hussam Ghazzi <[email protected]>
1 parent 2160dbd commit 5e1ed83

File tree

5 files changed

+12
-181
lines changed

5 files changed

+12
-181
lines changed

.changeset/soft-walls-help.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+
Add gap between ActionList label and `trailingVisual`

packages/react/src/ActionList/ActionList.module.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@
526526
grid-template-areas: 'label trailingVisual trailingAction';
527527
grid-template-columns: minmax(0, auto) min-content min-content;
528528
align-items: start;
529+
530+
/* column-gap persists with empty grid-areas, margin applies only when children exist */
531+
& > :not(:last-child) {
532+
/* stylelint-disable-next-line primer/spacing */
533+
margin-right: var(--control-medium-gap);
534+
}
529535
}
530536

531537
/* place children on grid */

packages/react/src/ActionList/Item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
291291
{
292292
// If the item is inactive, but it's not in an overlay (e.g. ActionMenu, SelectPanel),
293293
// render the inactive warning message directly in the item.
294-
!showInactiveIndicator ? (
294+
!showInactiveIndicator && inactiveText ? (
295295
<span className={classes.InactiveWarning} id={inactiveWarningId}>
296296
{inactiveText}
297297
</span>

0 commit comments

Comments
 (0)