Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Restore sources tree icons (#5786)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing authored and jasonLaster committed Mar 26, 2018
1 parent 2b34694 commit 0e11e3c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/PrimaryPanes/SourcesTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ class SourcesTree extends Component<Props, State> {
}

const sourceType = sourceTypes[getExtension(source)];
return <img className={sourceType || "file"} />;
const classNames = classnames("source-icon", sourceType || "file");
return <img className={classNames} />;
}

return <img className="folder" />;
Expand Down
30 changes: 25 additions & 5 deletions src/components/shared/Svg.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
fill: var(--theme-splitter-color);
}

.file,
.folder,
.domain {
.domain,
.source-icon,
.file {
background-color: var(--theme-comment);
}

.worker,
.file,
.folder {
.folder,
.source-icon {
position: relative;
top: 2px;
}
Expand All @@ -39,7 +41,8 @@
}

img.domain,
img.folder {
img.folder,
img.source-icon {
width: 15px;
height: 15px;
}
Expand All @@ -52,6 +55,22 @@ img.folder {
mask: url(/images/folder.svg) no-repeat;
}

img.coffeescript {
mask: url(/images/coffeescript.svg) no-repeat;
}

img.javascript {
mask: url(/images/javascript.svg) no-repeat;
}

img.react {
mask: url(/images/react.svg) no-repeat;
}

img.typescript {
mask: url(/images/typescript.svg) no-repeat;
}

img.file {
mask: url(/images/file.svg) no-repeat;
width: 13px;
Expand All @@ -60,7 +79,8 @@ img.file {

img.domain,
img.folder,
img.file {
img.file,
img.source-icon {
mask-size: 100%;
margin-inline-end: 5px;
display: inline-block;
Expand Down

0 comments on commit 0e11e3c

Please sign in to comment.