Skip to content

Commit b5ce61d

Browse files
christophidespPanos Christophides
andauthored
add new var for sorted column higlight, fix table height issue, align header icons (#435)
Co-authored-by: Panos Christophides <[email protected]>
1 parent 13e7b6d commit b5ce61d

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

src/components/tableV2/core/base-table.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Table.HeadCell = forwardRef(
140140
>
141141
<Flex>
142142
{children}
143-
<Box position="absolute" top={0.5} right={0.5} width={4} height={4}>
143+
<Box position="absolute" top={1} right="12px" width={4} height={4}>
144144
{tooltipText && (
145145
<Tooltip align="bottom" content={tooltipText}>
146146
<Icon color="nodeBadgeColor" size="small" name="information" />
@@ -214,7 +214,7 @@ Table.SortingHeadCell = forwardRef(
214214
headStyles={headStyles}
215215
{...props}
216216
filter={filter}
217-
{...(coloredSortedColumn && !!sortDirection && { background: "successBackground" })}
217+
{...(coloredSortedColumn && !!sortDirection && { background: "columnHighlight" })}
218218
>
219219
<Box
220220
onMouseEnter={onMouseEnter}
@@ -230,7 +230,7 @@ Table.SortingHeadCell = forwardRef(
230230
gap={1}
231231
>
232232
{children}
233-
<Box position="absolute" top={1} right="-16px">
233+
<Box position="absolute" top={0.5} right="-16px">
234234
<Icon
235235
height="16px"
236236
width="16px"
@@ -306,7 +306,7 @@ Table.Cell = forwardRef(
306306
backgroundOpacity={
307307
isColumnHovering && isRowHovering
308308
? rest.backgroundOpacity
309-
? rest.backgroundOpacity + 0.2
309+
? 0.8
310310
: 1
311311
: rest.backgroundOpacity || 0.7
312312
}

src/components/tableV2/core/rows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const Rows = ({
8585
{...(cell.column.getCanSort() &&
8686
coloredSortedColumn &&
8787
!!cell.column.getIsSorted() && {
88-
background: "successBackground",
89-
backgroundOpacity: 0.3,
88+
background: "columnHighlight",
89+
backgroundOpacity: virtualRow.index % 2 == 0 ? "0.2" : "0.4",
9090
})}
9191
index={virtualRow.index}
9292
isRowHovering={row.id === hoveredRow}

src/components/tableV2/features/columnPinning.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const ColumnPinning = ({
2626
position: "sticky",
2727
left: 0,
2828
zIndex: 2,
29+
height: "fit-content",
2930
}}
3031
>
3132
<FullTable

src/theme/dark/colors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const appColors = {
8181

8282
//Table
8383
tableRowBg: rawColors.neutral.arsenic,
84+
columnHighlight: rawColors.green.poker,
8485

8586
//IconButton
8687
iconColor: rawColors.neutral.iron,

src/theme/default/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const appColors = {
8181

8282
//Table
8383
tableRowBg: rawColors.neutral.blackhaze,
84-
84+
columnHighlight: rawColors.green.frostee,
8585
//IconButton
8686
iconColor: rawColors.neutral.limedSpruce,
8787

src/theme/rawColors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const rawColors = {
55
popover: "rgba(18, 36, 50, 0.9)",
66
},
77
green: {
8+
poker: "#2f5446",
89
chateau: "#42B861",
910
netdata: "#00AB44",
1011
deyork: "#68C47D",

0 commit comments

Comments
 (0)