Skip to content

Commit 9a35ec3

Browse files
spark33bruugey
andauthored
LG-3813: Alternate row color overrides selected row color (#2153)
* fix and changeset * adding condition to vs rows --------- Co-authored-by: Brooke Scarlett Yalof <[email protected]>
1 parent 0ece4ea commit 9a35ec3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/plenty-llamas-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/table': patch
3+
---
4+
5+
Fixes style bug where zebra row colors override selected row colors

packages/table/src/Row/InternalRowWithRT.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ const InternalRowWithRT = <T extends LGRowData>({
8686
<InternalRowBase
8787
className={cx(
8888
{
89-
[grayZebraRowStyles[theme]]: isOddVSRow && shouldAlternateRowColor,
90-
[zebraStyles[theme]]: !virtualRow && shouldAlternateRowColor,
89+
[grayZebraRowStyles[theme]]:
90+
isOddVSRow && shouldAlternateRowColor && !isSelected,
91+
[zebraStyles[theme]]:
92+
!virtualRow && shouldAlternateRowColor && !isSelected,
9193
[selectedRowStyles[theme]]: isSelected && !disabled,
9294
},
9395
className,

0 commit comments

Comments
 (0)