From 2f75cda984d580a1b50af17ba0667136cc5ff5a4 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Thu, 24 Oct 2024 14:30:36 +0200 Subject: [PATCH] use conditional class --- packages/trace-viewer/src/ui/attachmentsTab.css | 5 +++++ packages/trace-viewer/src/ui/attachmentsTab.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/trace-viewer/src/ui/attachmentsTab.css b/packages/trace-viewer/src/ui/attachmentsTab.css index db22a72f5d..c2455fc3c5 100644 --- a/packages/trace-viewer/src/ui/attachmentsTab.css +++ b/packages/trace-viewer/src/ui/attachmentsTab.css @@ -40,6 +40,11 @@ margin: 4px 8px; } +.attachment-title-highlight { + text-decoration: underline var(--vscode-terminal-findMatchBackground); + text-decoration-thickness: 1.5px; +} + .attachment-item img { flex: none; min-width: 200px; diff --git a/packages/trace-viewer/src/ui/attachmentsTab.tsx b/packages/trace-viewer/src/ui/attachmentsTab.tsx index 7003cc717f..d26089265e 100644 --- a/packages/trace-viewer/src/ui/attachmentsTab.tsx +++ b/packages/trace-viewer/src/ui/attachmentsTab.tsx @@ -24,6 +24,7 @@ import { CodeMirrorWrapper, lineHeight } from '@web/components/codeMirrorWrapper import { isTextualMimeType } from '@isomorphic/mimeType'; import { Expandable } from '@web/components/expandable'; import { linkifyText } from '@web/renderUtils'; +import { clsx } from '@web/uiUtils'; type Attachment = AfterActionTraceEventAttachment & { traceUrl: string }; @@ -64,7 +65,7 @@ const ExpandableAttachment: React.FunctionComponent = }, [attachmentText]); const title = - {linkifyText(attachment.name)} + {linkifyText(attachment.name)} {hasContent && download} ;