Skip to content

Commit

Permalink
fix(CommandPalette): prevent empty active slot
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Oct 9, 2022
1 parent 95c14a4 commit 056ab30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/components/navigation/CommandPaletteGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 056ab30

Please sign in to comment.