Skip to content

Commit a129809

Browse files
committed
change file item background when editing
1 parent 18a64f6 commit a129809

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/FsExplorer.jsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,16 @@ export function FSExplorer() {
6666
padding-inline: 0.5rem;
6767
background: var(--bg);
6868
transition: background 0.15s ease;
69-
}
7069
71-
.item:hover {
72-
background: var(--surface0);
73-
transition: background 0.15s ease;
70+
&:hover {
71+
background: var(--surface0);
72+
transition: background 0.15s ease;
73+
}
74+
75+
&.selected {
76+
background: var(--surface1);
77+
transition: background 0.15s ease;
78+
}
7479
}
7580
7681
#path {
@@ -136,7 +141,7 @@ export function FSExplorer() {
136141
)
137142
} else {
138143
return (
139-
<div class="item flex vcenter space-between" role="button" on:click={() => {
144+
<div class={["item", "flex", "vcenter", "space-between", use(this.filePath, p => this.path + r == p && "selected")]} role="button" on:click={() => {
140145
this.displayingFile = true;
141146
this.filePath = this.path + r;
142147
try {

0 commit comments

Comments
 (0)