Skip to content

Commit 99f24dd

Browse files
samejrmatt-aitken
authored andcommitted
nicer basic TRQL table styling
1 parent c52c6f7 commit 99f24dd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/webapp/app/components/code/TSQLResultsTable.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ function CopyableCell({
714714
<div
715715
className={cn(
716716
"relative flex w-full items-center overflow-hidden px-2 py-1.5",
717-
"bg-background-dimmed group-hover/row:bg-charcoal-800",
717+
"bg-background-bright group-hover/row:bg-charcoal-750",
718718
"font-mono text-xs text-text-dimmed group-hover/row:text-text-bright",
719719
alignment === "right" && "justify-end"
720720
)}
@@ -786,7 +786,7 @@ function HeaderCellContent({
786786
return (
787787
<div
788788
className={cn(
789-
"flex w-full items-center gap-1 overflow-hidden bg-background-dimmed py-1.5 pl-2 pr-1",
789+
"flex w-full items-center gap-1 overflow-hidden bg-background-bright py-1.5 pl-2 pr-1",
790790
"font-mono text-xs font-medium text-text-bright",
791791
alignment === "right" && "justify-end",
792792
canSort && "cursor-pointer select-none"
@@ -866,7 +866,7 @@ function FilterCell({
866866
}, [shouldFocus, onFocused]);
867867

868868
return (
869-
<div className="flex items-center bg-background-dimmed px-1.5 pb-1" style={{ width }}>
869+
<div className="flex items-center bg-background-bright px-1.5 pb-1" style={{ width }}>
870870
<DebouncedInput
871871
ref={inputRef}
872872
value={columnFilterValue ?? ""}
@@ -968,7 +968,7 @@ export const TSQLResultsTable = memo(function TSQLResultsTable({
968968
>
969969
<table style={{ display: "grid" }}>
970970
<thead
971-
className="bg-background-dimmed"
971+
className="border-t border-grid-bright bg-background-bright"
972972
style={{
973973
display: "grid",
974974
position: "sticky",
@@ -1040,7 +1040,7 @@ export const TSQLResultsTable = memo(function TSQLResultsTable({
10401040
</tr>
10411041
)}
10421042
</thead>
1043-
<tbody style={{ display: "grid" }}>
1043+
<tbody className="border-b border-grid-bright" style={{ display: "grid" }}>
10441044
<tr style={{ display: "flex" }}>
10451045
<td>
10461046
<Paragraph variant="extra-small" className="p-4 text-text-dimmed">
@@ -1062,7 +1062,7 @@ export const TSQLResultsTable = memo(function TSQLResultsTable({
10621062
>
10631063
<table style={{ display: "grid" }}>
10641064
<thead
1065-
className="bg-background-dimmed after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-grid-bright"
1065+
className="border-t border-grid-bright bg-background-bright after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-grid-bright"
10661066
style={{
10671067
display: "grid",
10681068
position: "sticky",
@@ -1141,15 +1141,15 @@ export const TSQLResultsTable = memo(function TSQLResultsTable({
11411141
height: `${rowVirtualizer.getTotalSize()}px`,
11421142
position: "relative",
11431143
}}
1144-
className="divide-y divide-charcoal-700 bg-background-dimmed"
1144+
className="divide-y divide-charcoal-700 border-b border-grid-bright bg-background-bright"
11451145
>
11461146
{rowVirtualizer.getVirtualItems().map((virtualRow) => {
11471147
const row = tableRows[virtualRow.index];
11481148
return (
11491149
<tr
11501150
key={row.id}
11511151
data-index={virtualRow.index}
1152-
className="group/row hover:bg-charcoal-800"
1152+
className="group/row hover:bg-charcoal-750"
11531153
style={{
11541154
display: "flex",
11551155
position: "absolute",

0 commit comments

Comments
 (0)