@@ -8,6 +8,7 @@ import MenuItem from "@material-ui/core/MenuItem"
8
8
import { FC , useState } from "react"
9
9
import { FileTree } from "util/filetree"
10
10
import { DockerIcon } from "components/Icons/DockerIcon"
11
+ import { colors } from "theme/colors"
11
12
12
13
const sortFileTree = ( fileTree : FileTree ) => ( a : string , b : string ) => {
13
14
const contentA = fileTree [ a ]
@@ -98,7 +99,6 @@ export const FileTreeView: FC<{
98
99
defaultCollapseIcon = { < ExpandMoreIcon /> }
99
100
defaultExpandIcon = { < ChevronRightIcon /> }
100
101
aria-label = "Files"
101
- className = { styles . fileTree }
102
102
>
103
103
{ Object . keys ( fileTree )
104
104
. sort ( sortFileTree ( fileTree ) )
@@ -156,23 +156,22 @@ export const FileTreeView: FC<{
156
156
}
157
157
158
158
const useStyles = makeStyles ( ( theme ) => ( {
159
- fileTree : { } ,
160
159
fileTreeItem : {
161
160
overflow : "hidden" ,
162
161
userSelect : "none" ,
163
162
164
- "&:focus" : {
165
- "& > .MuiTreeItem-content" : {
166
- background : "rgba(255, 255, 255, 0.1)" ,
167
- } ,
163
+ "&:focus:not(.active) > .MuiTreeItem-content" : {
164
+ background : theme . palette . action . hover ,
165
+ color : theme . palette . text . primary ,
168
166
} ,
169
- "& > .MuiTreeItem-content:hover" : {
170
- background : theme . palette . background . paperLight ,
167
+
168
+ "&:not(:focus):not(.active) > .MuiTreeItem-content:hover" : {
169
+ background : theme . palette . action . hover ,
171
170
color : theme . palette . text . primary ,
172
171
} ,
173
172
174
173
"& > .MuiTreeItem-content" : {
175
- padding : "1px 16px" ,
174
+ padding : theme . spacing ( 0.25 , 2 ) ,
176
175
color : theme . palette . text . secondary ,
177
176
178
177
"& svg" : {
@@ -182,16 +181,25 @@ const useStyles = makeStyles((theme) => ({
182
181
183
182
"& > .MuiTreeItem-label" : {
184
183
marginLeft : 4 ,
185
- fontSize : 14 ,
184
+ fontSize : 13 ,
186
185
color : "inherit" ,
187
186
} ,
188
187
} ,
189
188
190
189
"&.active" : {
191
- background : theme . palette . background . paper ,
192
-
193
190
"& > .MuiTreeItem-content" : {
194
191
color : theme . palette . text . primary ,
192
+ background : colors . gray [ 13 ] ,
193
+ pointerEvents : "none" ,
194
+ } ,
195
+ } ,
196
+
197
+ "& .MuiTreeItem-group" : {
198
+ marginLeft : 0 ,
199
+
200
+ // We need to find a better way to recursive padding here
201
+ "& .MuiTreeItem-content" : {
202
+ paddingLeft : theme . spacing ( 5 ) ,
195
203
} ,
196
204
} ,
197
205
} ,
0 commit comments