fix: text overflow on spotlight search results (#3181)

This commit is contained in:
Liyas Thomas
2023-07-17 12:32:45 +05:30
committed by GitHub
parent 8300f9a0a2
commit 31fd6567b7

View File

@@ -12,37 +12,37 @@
class="opacity-50 svg-icons" class="opacity-50 svg-icons"
:class="{ 'opacity-100': active }" :class="{ 'opacity-100': active }"
/> />
<span <template
v-if="entry.text.type === 'text' && typeof entry.text.text === 'string'" v-if="entry.text.type === 'text' && typeof entry.text.text === 'string'"
class="block truncate"
> >
<span class="block truncate">
{{ entry.text.text }} {{ entry.text.text }}
</span> </span>
<span </template>
<template
v-else-if="entry.text.type === 'text' && Array.isArray(entry.text.text)" v-else-if="entry.text.type === 'text' && Array.isArray(entry.text.text)"
class="flex items-center flex-1"
> >
<span <template
v-for="(labelPart, labelPartIndex) in entry.text.text" v-for="(labelPart, labelPartIndex) in entry.text.text"
:key="`label-${labelPart}-${labelPartIndex}`" :key="`label-${labelPart}-${labelPartIndex}`"
class="flex items-center space-x-2"
> >
<span class="block truncate">
{{ labelPart }} {{ labelPart }}
</span>
<icon-lucide-chevron-right <icon-lucide-chevron-right
v-if="labelPartIndex < entry.text.text.length - 1" v-if="labelPartIndex < entry.text.text.length - 1"
class="block truncate" class="flex flex-shrink-0"
/> />
</span> </template>
</span> </template>
<span <template v-else-if="entry.text.type === 'custom'">
v-else-if="entry.text.type === 'custom'" <span class="block truncate">
class="block truncate w-full"
>
<component <component
:is="entry.text.component" :is="entry.text.component"
v-bind="entry.text.componentProps" v-bind="entry.text.componentProps"
/> />
</span> </span>
</template>
<span v-if="formattedShortcutKeys" class="block truncate"> <span v-if="formattedShortcutKeys" class="block truncate">
<kbd <kbd
v-for="(key, keyIndex) in formattedShortcutKeys" v-for="(key, keyIndex) in formattedShortcutKeys"