add expanding/contracting styles
This commit is contained in:
parent
e82270a709
commit
550347e6fc
4 changed files with 31 additions and 21 deletions
|
@ -1,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg width="10px" height="10px" viewBox="0 0 5 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="10px" height="10px" viewBox="0 0 5 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
|
<title>Down Arrow</title>
|
||||||
<title>Triangle 3</title>
|
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
<defs></defs>
|
<defs></defs>
|
||||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
|
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 698 B |
|
@ -1,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg width="10px" height="10px" viewBox="0 0 5 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="10px" height="10px" viewBox="0 0 5 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
|
<title>Right Arrow</title>
|
||||||
<title>Triangle 3</title>
|
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
<defs></defs>
|
<defs></defs>
|
||||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
|
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 698 B |
|
@ -83,23 +83,22 @@ export class FileNode extends React.Component {
|
||||||
<InlineSVG src={fileUrl} />
|
<InlineSVG src={fileUrl} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
} else if (this.props.isFolderClosed) {
|
|
||||||
return (
|
|
||||||
<span
|
|
||||||
className="sidebar__file-item-icon"
|
|
||||||
onClick={() => this.props.showFolderChildren(this.props.id)}
|
|
||||||
>
|
|
||||||
<InlineSVG src={folderRightUrl} />
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<span
|
<span
|
||||||
className="sidebar__file-item-icon"
|
className="sidebar__file-item-closed"
|
||||||
|
onClick={() => this.props.showFolderChildren(this.props.id)}
|
||||||
|
>
|
||||||
|
<InlineSVG className="folder-right" src={folderRightUrl} />
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
className="sidebar__file-item-open"
|
||||||
onClick={() => this.props.hideFolderChildren(this.props.id)}
|
onClick={() => this.props.hideFolderChildren(this.props.id)}
|
||||||
>
|
>
|
||||||
<InlineSVG src={folderDownUrl} />
|
<InlineSVG className="folder-down" src={folderDownUrl} />
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
<a className="sidebar__file-item-name">{this.props.name}</a>
|
<a className="sidebar__file-item-name">{this.props.name}</a>
|
||||||
|
|
|
@ -166,6 +166,21 @@
|
||||||
margin-right: #{5 / $base-font-size}rem;
|
margin-right: #{5 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar__file-item-closed {
|
||||||
|
@extend .sidebar__file-item-icon;
|
||||||
|
display: none;
|
||||||
|
.sidebar__file-item--closed & {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar__file-item-open {
|
||||||
|
@extend .sidebar__file-item-icon;
|
||||||
|
.sidebar__file-item--closed & {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar__project-options {
|
.sidebar__project-options {
|
||||||
@extend %modal;
|
@extend %modal;
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Reference in a new issue