1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-29 17:50:09 +02:00

command palette ui fixes

This commit is contained in:
Kushagra Gour
2019-03-03 19:04:22 +05:30
parent 4a16b77dc8
commit 7d61a8924f
3 changed files with 24 additions and 10 deletions

View File

@@ -24,13 +24,20 @@ function Row({ item, onClick, isSelected }) {
}`}
onClick={onClick}
>
{item.path ? <FileIcon file={item} /> : null}
{item.name}
{item.path ? (
<div>
{item.path ? <FileIcon file={item} /> : null}
{item.name}
{item.path ? (
<span class="command-palette__option-subtitle">
{getFolder(item.path)}
</span>
) : null}
</div>
<div>
<span class="command-palette__option-subtitle">
{getFolder(item.path)}
{item.keyboardShortcut ? item.keyboardShortcut : ''}
</span>
) : null}
</div>
</button>
</li>
);
@@ -101,6 +108,7 @@ export class CommandPalette extends Component {
closeHandler={this.props.closeHandler}
noOverlay
hideCloseButton
extraClasses="modal--command-palette"
>
<AutoFocusInput
type="search"
@@ -108,6 +116,7 @@ export class CommandPalette extends Component {
value={this.state.search}
onInput={this.inputHandler.bind(this)}
onKeyUp={this.keyDownHandler.bind(this)}
style="width:100%"
/>
<ul class="command-palette__option-list">
{this.state.list.map((item, index) => (