mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(CommandPalette): prevent empty active slot
This commit is contained in:
@@ -33,9 +33,9 @@
|
||||
</div>
|
||||
|
||||
<Icon v-if="selected" name="heroicons-outline:check" class="h-5 w-5 u-text-gray-900 flex-shrink-0" aria-hidden="true" />
|
||||
<span v-else-if="active" class="flex-shrink-0 u-text-gray-500">
|
||||
<slot :name="`${group.key}-active`" :group="group" :command="command">{{ group.active }}</slot>
|
||||
</span>
|
||||
<slot v-else-if="active" :name="`${group.key}-active`" :group="group" :command="command">
|
||||
<span v-if="group.active" class="flex-shrink-0 u-text-gray-500">{{ group.active }}</span>
|
||||
</slot>
|
||||
<slot v-else :name="`${group.key}-inactive`" :group="group" :command="command">
|
||||
<span v-if="command.shortcuts?.length" class="flex-shrink-0 text-xs font-semibold u-text-gray-500">
|
||||
<kbd v-for="shortcut of command.shortcuts" :key="shortcut" class="font-sans">{{ shortcut }}</kbd>
|
||||
|
||||
Reference in New Issue
Block a user