fix(ui): slash palette at label size with descriptions under each command
This commit is contained in:
1 file changed
+3
-3
@@ -48,7 +48,7 @@ watch(
|
||||
id="slash-palette"
|
||||
role="listbox"
|
||||
:aria-label="label"
|
||||
class="absolute inset-x-3 bottom-[calc(100%-0.25rem)] z-30 grid max-h-72 gap-0.5 overflow-auto rounded-lg border border-border-strong bg-popover p-1.5 shadow-md"
|
||||
class="absolute inset-x-3 bottom-[calc(100%-0.25rem)] z-30 grid max-h-72 gap-0.5 overflow-auto rounded-lg border border-border-strong bg-popover p-1.5 text-label shadow-md"
|
||||
>
|
||||
<div v-if="error" role="alert" class="flex items-center justify-between gap-2 px-2.5 py-2 text-danger">
|
||||
<span class="truncate">{{ error }}</span>
|
||||
@@ -61,12 +61,12 @@ watch(
|
||||
role="option"
|
||||
:id="`slash-palette-option-${index}`"
|
||||
:aria-selected="index === selection"
|
||||
class="grid grid-cols-[minmax(8rem,14rem)_1fr] items-center gap-2.5 rounded-md border border-transparent px-2.5 py-2 text-left text-fg-muted hover:bg-muted hover:text-foreground aria-selected:border-border aria-selected:bg-muted aria-selected:text-foreground"
|
||||
class="flex flex-col gap-0.5 rounded-md border border-transparent px-2.5 py-1.5 text-left text-fg-muted hover:bg-muted hover:text-foreground aria-selected:border-border aria-selected:bg-muted aria-selected:text-foreground"
|
||||
@mousedown.prevent
|
||||
@click="emit('choose', index)"
|
||||
>
|
||||
<code class="truncate text-foreground">{{ item.label }}</code>
|
||||
<span class="truncate">{{ item.detail }}</span>
|
||||
<span v-if="item.detail" class="line-clamp-2 text-caption">{{ item.detail }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user