mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 07:52:03 +00:00
fix: use group-hover for file tree icon color swap at all nesting levels
This commit is contained in:
parent
c34ad7223a
commit
fbe9669c57
2 changed files with 9 additions and 14 deletions
|
|
@ -550,8 +550,15 @@ export default function FileTree(props: {
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={!node.ignored}>
|
<Match when={!node.ignored}>
|
||||||
<span class="filetree-iconpair size-4">
|
<span class="filetree-iconpair size-4">
|
||||||
<FileIcon node={node} class="size-4 filetree-icon filetree-icon--color" />
|
<FileIcon
|
||||||
<FileIcon node={node} class="size-4 filetree-icon filetree-icon--mono" mono />
|
node={node}
|
||||||
|
class="size-4 filetree-icon filetree-icon--color opacity-0 group-hover/filetree:opacity-100"
|
||||||
|
/>
|
||||||
|
<FileIcon
|
||||||
|
node={node}
|
||||||
|
class="size-4 filetree-icon filetree-icon--mono group-hover/filetree:opacity-0"
|
||||||
|
mono
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</Match>
|
</Match>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,3 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-component="filetree"] .filetree-iconpair .filetree-icon--color {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-component="filetree"]:hover .filetree-iconpair .filetree-icon--color {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-component="filetree"]:hover .filetree-iconpair .filetree-icon--mono {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue