Skip to content

Commit b6875a1

Browse files
herzadinataBOCOVO
authored andcommitted
feat(dblm-ext): apply table color to primary key
1 parent d111ba1 commit b6875a1

File tree

1 file changed

+8
-2
lines changed
  • packages/json-table-schema-visualizer/src/components/Column

1 file changed

+8
-2
lines changed

packages/json-table-schema-visualizer/src/components/Column/Column.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const Column = ({
4141
const colTextColor = themeColors.text[900];
4242
const typeTextColor = themeColors.text[700];
4343
const fontStyle = isPrimaryKey ? "bold" : "normal";
44+
const colNameBaseFill = isPrimaryKey
45+
? tableColors?.regular ?? colTextColor
46+
: colTextColor;
4447

4548
return (
4649
<ColumnWrapper
@@ -55,8 +58,11 @@ const Column = ({
5558
ellipsis
5659
wrap="none"
5760
text={colName}
58-
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing
59-
fill={(highlighted && tableColors?.regular) || colTextColor}
61+
fill={
62+
highlighted
63+
? tableColors?.regular ?? colNameBaseFill
64+
: colNameBaseFill
65+
}
6066
width={tablePreferredWidth}
6167
fontStyle={fontStyle}
6268
padding={PADDINGS.sm}

0 commit comments

Comments
 (0)