Skip to content

Commit

Permalink
Use functional color variables in FilterList
Browse files Browse the repository at this point in the history
  • Loading branch information
VanAnderson committed Mar 2, 2021
1 parent f9d29cc commit 53c97b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-guests-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/components': patch
---

Use functional color variables in FilterList
10 changes: 5 additions & 5 deletions src/FilterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ const FilterListItemBase = styled.a<StyledFilterListItemBaseProps>`
margin: ${props => (props.small ? '0 0 2px' : '0 0 5px 0')};
overflow: hidden;
font-size: ${get('fontSizes.1')};
color: ${props => (props.selected ? get('colors.white') : get('colors.gray.6'))};
background-color: ${props => (props.selected ? get('colors.blue.5') : '')}!important;
color: ${props => (props.selected ? get('colors.state.selected.primaryText') : get('colors.text.secondary'))};
background-color: ${props => (props.selected ? get('colors.state.selected.primaryBg') : '')}!important;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
border-radius: ${get('radii.1')};
&:hover {
text-decoration: none;
background-color: ${get('colors.filterList.hoverBg')};
background-color: ${get('colors.bg.tertiary')};
}
&:active {
color: ${get('colors.white')};
background-color: ${get('colors.blue.5')};
color: ${get('colors.state.selected.primaryText')};
background-color: ${get('colors.state.selected.primaryBg')};
}
.count {
float: right;
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/__snapshots__/FilterListItem.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`FilterList.Item renders consistently 1`] = `
.c0:hover {
-webkit-text-decoration: none;
text-decoration: none;
background-color: #eaecef;
background-color: #f6f8fa;
}
.c0:active {
Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`FilterList.Item respects the "selected" prop 1`] = `
.c0:hover {
-webkit-text-decoration: none;
text-decoration: none;
background-color: #eaecef;
background-color: #f6f8fa;
}
.c0:active {
Expand Down

0 comments on commit 53c97b9

Please sign in to comment.