Skip to content

Commit f74e703

Browse files
committed
feat: configurable color for subject folders to improve visual clarity
1 parent b805e2b commit f74e703

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/DatasetDetailPage/FileTree/FileTreeRow.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const FileTreeRow: React.FC<Props> = ({ node, level, onPreview }) => {
5656
// );
5757
// }
5858
if (node.kind === "folder") {
59+
const isSubject = /^sub-/i.test(node.name); // subject folders only
5960
return (
6061
<>
6162
<Box
@@ -71,11 +72,18 @@ const FileTreeRow: React.FC<Props> = ({ node, level, onPreview }) => {
7172
onClick={() => setOpen((o) => !o)}
7273
>
7374
<Box sx={{ pl: level * 1.25 }}>
74-
<FolderIcon fontSize="small" sx={{ color: Colors.darkPurple }} />
75+
<FolderIcon
76+
fontSize="small"
77+
sx={{ color: isSubject ? Colors.purple : Colors.darkPurple }}
78+
/>
7579
</Box>
7680

7781
<Typography
78-
sx={{ fontWeight: 600, flex: 1, color: Colors.darkPurple }}
82+
sx={{
83+
fontWeight: 600,
84+
flex: 1,
85+
color: isSubject ? Colors.purple : Colors.darkPurple,
86+
}}
7987
>
8088
{node.name}
8189
</Typography>

0 commit comments

Comments
 (0)