From edf00752f7fc1db60d2a47acc3b58c4a77488b4c Mon Sep 17 00:00:00 2001 From: Charles Brown Date: Thu, 16 Nov 2023 07:23:43 -0600 Subject: [PATCH] Ensure selected row color takes precedence --- .changeset/clean-beds-pull.md | 5 +++++ packages/webui/src/components/ui/TraceListRow.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/clean-beds-pull.md diff --git a/.changeset/clean-beds-pull.md b/.changeset/clean-beds-pull.md new file mode 100644 index 0000000..ce714d2 --- /dev/null +++ b/.changeset/clean-beds-pull.md @@ -0,0 +1,5 @@ +--- +'@envyjs/webui': patch +--- + +Ensure selected row color takes precendence diff --git a/packages/webui/src/components/ui/TraceListRow.tsx b/packages/webui/src/components/ui/TraceListRow.tsx index 5b0ef7c..7a606c5 100644 --- a/packages/webui/src/components/ui/TraceListRow.tsx +++ b/packages/webui/src/components/ui/TraceListRow.tsx @@ -18,8 +18,9 @@ export default function TraceListRow({ trace }: { trace: Trace }) { key={trace.id} onClick={() => setSelectedTrace(trace.id)} className={tw( - 'table-row h-11 hover:bg-apple-200 hover:cursor-pointer hover:text-apple-900 even:bg-manatee-200 text-manatee-800', + 'table-row h-11 hover:bg-apple-200 hover:cursor-pointer hover:text-apple-900 text-manatee-800', trace.http?.state === HttpRequestState.Sent && 'text-manatee-500', + trace.id !== selectedTraceId && 'even:bg-manatee-200', trace.id === selectedTraceId && 'bg-manatee-400 text-manatee-950', )} >