Remove file menu on blur

This commit is contained in:
nimish 2019-03-13 18:10:47 +05:30
parent 87c012b9f6
commit a018929489
2 changed files with 4 additions and 1 deletions

View File

@ -154,6 +154,7 @@ export class FileNode extends React.Component {
tabIndex="0" tabIndex="0"
onClick={this.toggleFileOptions} onClick={this.toggleFileOptions}
onBlur={() => setTimeout(this.hideFileOptions, 200)} onBlur={() => setTimeout(this.hideFileOptions, 200)}
style={{ display: (this.state.isOptionsOpen) ? 'inline-block' : '' }}
> >
<InlineSVG src={downArrowUrl} /> <InlineSVG src={downArrowUrl} />
</button> </button>

View File

@ -125,7 +125,6 @@
@include icon(); @include icon();
@include themify() { @include themify() {
padding: #{4 / $base-font-size}rem 0; padding: #{4 / $base-font-size}rem 0;
background-color: map-get($theme-map, 'file-selected-color');
padding-right: #{6 / $base-font-size}rem; padding-right: #{6 / $base-font-size}rem;
} }
display: none; display: none;
@ -137,6 +136,9 @@
display: none; display: none;
} }
} }
.sidebar__file-item:hover > .file-item__content & {
display: inline-block;
}
& svg { & svg {
width: #{10 / $base-font-size}rem; width: #{10 / $base-font-size}rem;
} }