Skip to content

Commit 7393433

Browse files
committed
review comment: extract inline style to a constant
1 parent bb2faa3 commit 7393433

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/packages/frontend/project/page/file-tab.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,8 @@ const LABEL_STYLE: CSS = {
536536
whiteSpace: "nowrap",
537537
} as const;
538538

539+
const DIMMED_STYLE = { color: COLORS.FILE_DIMMED } as const;
540+
539541
const FULLPATH_LABEL_STYLE: CSS = {
540542
// using a full path for the label instead of just a filename
541543
textOverflow: "ellipsis",
@@ -592,11 +594,7 @@ function DisplayedLabel({ path, label, inline = true, project_id }) {
592594
>
593595
<span style={{ direction: "ltr" }}>
594596
{label}
595-
<span
596-
style={dimFileExtensions ? { color: COLORS.FILE_DIMMED } : undefined}
597-
>
598-
{ext}
599-
</span>
597+
<span style={dimFileExtensions ? DIMMED_STYLE : undefined}>{ext}</span>
600598
</span>
601599
</div>
602600
);

0 commit comments

Comments
 (0)