Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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-rings-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix: make `active` label bold in ActionList
2 changes: 1 addition & 1 deletion packages/react/src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
id={labelId}
sx={{
flexGrow: slots.inlineDescription ? 0 : 1,
fontWeight: slots.inlineDescription || slots.blockDescription ? 'bold' : 'normal',
fontWeight: slots.inlineDescription || slots.blockDescription || active ? 'bold' : 'normal',
marginBlockEnd: slots.blockDescription ? '4px' : undefined,
}}
>
Expand Down
52 changes: 38 additions & 14 deletions packages/react/src/NavList/__snapshots__/NavList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ exports[`NavList renders a simple list 1`] = `
}

.c6 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 600;
}

.c8 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
Expand Down Expand Up @@ -357,7 +365,7 @@ exports[`NavList renders a simple list 1`] = `
data-component="ActionList.Item--DividerContainer"
>
<span
class="c6"
class="c8"
id=":r2:--label"
>
About
Expand All @@ -380,7 +388,7 @@ exports[`NavList renders a simple list 1`] = `
data-component="ActionList.Item--DividerContainer"
>
<span
class="c6"
class="c8"
id=":r3:--label"
>
Contact
Expand Down Expand Up @@ -434,6 +442,14 @@ exports[`NavList renders with groups 1`] = `
}

.c10 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 600;
}

.c12 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
Expand Down Expand Up @@ -825,7 +841,7 @@ exports[`NavList renders with groups 1`] = `
data-component="ActionList.Item--DividerContainer"
>
<span
class="c10"
class="c12"
id=":r8:--label"
>
Avatar
Expand Down Expand Up @@ -894,6 +910,14 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
color: var(--fgColor-default,var(--color-fg-default,#1F2328));
}

.c14 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 600;
}

.c10 {
padding: 0;
margin: 0;
Expand All @@ -917,8 +941,8 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
--divider-color: transparent !important;
}

.c14:hover:not([aria-disabled]):not([data-inactive]) + .c3,
.c14[data-focus-visible-added] + li {
.c15:hover:not([aria-disabled]):not([data-inactive]) + .c3,
.c15[data-focus-visible-added] + li {
--divider-color: transparent;
}

Expand Down Expand Up @@ -1287,7 +1311,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
data-component="ActionList.Item--DividerContainer"
>
<span
class="c1 c7"
class="c1 c14"
id=":r22:--label"
>
Sub Item
Expand Down Expand Up @@ -1334,14 +1358,6 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
flex-grow: 1;
}

.c7 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 400;
}

.c8 {
height: 20px;
-webkit-flex-shrink: 0;
Expand All @@ -1363,6 +1379,14 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
display: none;
}

.c7 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 600;
}

.c9 {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
Expand Down