-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Table): upgrade stripped props to support painting columns
- Loading branch information
Artur Fracala
authored and
Artur Fracala
committed
Dec 3, 2024
1 parent
64a6396
commit 56710f8
Showing
6 changed files
with
67 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/react-components/src/components/Table/styles/strips.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@mixin generateStrips($type) { | ||
@if $type == 'rows' { | ||
tbody tr:nth-child(odd) { | ||
background-color: var(--surface-secondary-default); | ||
|
||
&:hover { | ||
background-color: var(--surface-primary-disabled) !important; | ||
} | ||
} | ||
} | ||
|
||
@else if $type == 'columns' { | ||
tbody tr td:nth-child(even) { | ||
background-color: var(--surface-secondary-default); | ||
} | ||
|
||
tbody tr:hover td:nth-child(even) { | ||
background-color: var(--surface-primary-hover); | ||
} | ||
} | ||
|
||
@else { | ||
@warn "Invalid stripped value: #{$type}. Supported values are 'rows' and 'columns'."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters