Skip to content

Commit

Permalink
font weight bold for ActionList.Item with inline description (#3170)
Browse files Browse the repository at this point in the history
* change font weight to bold when an inline description is added to ActionList.Item

* add changeset

* Update src/ActionList/Item.tsx

Co-authored-by: Cole Bemis <colebemis@github.com>

* test(vrt): update snapshots

---------

Co-authored-by: Cole Bemis <colebemis@github.com>
Co-authored-by: lukasoppermann <lukasoppermann@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 14, 2023
1 parent d749f49 commit 1f2df9b
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-bears-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

When an inline description is added to the item the normal text is set to bold
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,14 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
if={Boolean(slots.InlineDescription)}
sx={{display: 'flex', flexGrow: 1, alignItems: 'baseline', minWidth: 0}}
>
<Box as="span" id={labelId} sx={{flexGrow: slots.InlineDescription ? 0 : 1}}>
<Box
as="span"
id={labelId}
sx={{
flexGrow: slots.InlineDescription ? 0 : 1,
fontWeight: slots.InlineDescription ? 'bold' : 'normal',
}}
>
{props.children}
</Box>
{slots.InlineDescription}
Expand Down
4 changes: 4 additions & 0 deletions src/NavList/__snapshots__/NavList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`NavList renders a simple list 1`] = `
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 400;
}
.c0 {
Expand Down Expand Up @@ -383,6 +384,7 @@ exports[`NavList renders with groups 1`] = `
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 400;
}
.c1 {
Expand Down Expand Up @@ -807,6 +809,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 400;
}
.c1 {
Expand Down Expand Up @@ -1268,6 +1271,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
font-weight: 400;
}
.c1 {
Expand Down

0 comments on commit 1f2df9b

Please sign in to comment.