Skip to content

Commit

Permalink
Fix tree structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Raathigesh committed May 6, 2020
1 parent 86f27f5 commit 93bd21c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ui/sidebar/file-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ChevronRight,
ChevronDown,
Frown,
ZapOff
ZapOff,
} from "react-feather";
import { color } from "styled-system";
import { TreeNode } from "./transformer";
Expand All @@ -24,13 +24,12 @@ const Content = styled.div<any>`
align-items: center;
padding: 2.5px;
cursor: pointer;
color: ${props =>
color: ${(props) =>
props.failed ? "#FE5339" : props.passing ? "#19E28D" : null};
background-color: ${props => (props.selected ? "#444444" : null)};
background-color: ${(props) => (props.selected ? "#444444" : null)};
border-radius: 3px;
margin-bottom: 2px;
font-weight: 600;
margin-left: ${props => `${props.hierarchy * 15}px`}
&:hover {
background-color: #444444;
Expand Down Expand Up @@ -64,7 +63,7 @@ function FileItem({
selectedFile,
setSelectedFile,
onToggle,
style
style,
}: Props) {
const Icon =
item.type === "directory" ? Folder : item.haveFailure ? ZapOff : File;
Expand All @@ -87,7 +86,8 @@ function FileItem({
<Container
style={{
...style,
width: "90%"
width: "90%",
marginLeft: `${(item.hierarchy + 1) * 15}px`,
}}
>
<Content
Expand Down

0 comments on commit 93bd21c

Please sign in to comment.