mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 08:16:00 +00:00
css for command palette
This commit is contained in:
@@ -72,23 +72,29 @@
|
|||||||
<div class="search">
|
<div class="search">
|
||||||
<input type="text" bind:this={domInput} bind:value={filter} on:keydown={handleKeyDown} />
|
<input type="text" bind:this={domInput} bind:value={filter} on:keydown={handleKeyDown} />
|
||||||
</div>
|
</div>
|
||||||
{#each filteredItems as command, index}
|
<div class="content">
|
||||||
<div class="command" class:selected={index == selectedIndex} on:click={() => handleCommand(command)}>
|
{#each filteredItems as command, index}
|
||||||
<div>{command.text}</div>
|
<div class="command" class:selected={index == selectedIndex} on:click={() => handleCommand(command)}>
|
||||||
{#if command.keyText}
|
<div>{command.text}</div>
|
||||||
<div class="shortcut">{command.keyText}</div>
|
{#if command.keyText}
|
||||||
{/if}
|
<div class="shortcut">{command.keyText}</div>
|
||||||
</div>
|
{/if}
|
||||||
{/each}
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.main {
|
.main {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
max-height: 500px;
|
|
||||||
background: var(--theme-bg-2);
|
background: var(--theme-bg-2);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
.search {
|
.search {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user