mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-19 23:40:07 +00:00
chore: reduce emoji picker size
This commit is contained in:
parent
e847f8ef1d
commit
d21860487b
2 changed files with 11 additions and 13 deletions
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { Emoji } from 'emoji-mart'
|
||||
|
||||
export interface SearchEmoji {
|
||||
title: string
|
||||
src: string
|
||||
|
@ -12,18 +10,13 @@ defineProps<{
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div flex gap-2 items-center>
|
||||
<div flex="~ gap3" items-center text-base>
|
||||
<img
|
||||
:key="emoji.title"
|
||||
width="30"
|
||||
height="30"
|
||||
width="20"
|
||||
height="20"
|
||||
:src="emoji.src"
|
||||
loading="lazy"
|
||||
>
|
||||
<div flex="~ col gap1" pt-1 pl-2 shrink h-full overflow-hidden leading-none>
|
||||
<div flex="~" gap-2>
|
||||
<span text-lg>:{{ emoji.title }}:</span>
|
||||
</div>
|
||||
</div>
|
||||
<span shrink overflow-hidden leading-none text-base><span text-secondary>:</span>{{ emoji.title }}<span text-secondary>:</span></span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { getEmojiMatchesInText } from '@iconify/utils/lib/emoji/replace/find'
|
|||
import CommonScrollIntoView from '../common/CommonScrollIntoView.vue'
|
||||
import type { CustomEmoji, Emoji } from '~~/composables/tiptap/suggestion'
|
||||
import { isCustomEmoji } from '~~/composables/tiptap/suggestion'
|
||||
import { emojiFilename, emojiPrefix, emojiRegEx, getEmojiAttributes } from '~~/config/emojis'
|
||||
import { emojiFilename, emojiPrefix, emojiRegEx } from '~~/config/emojis'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: (CustomEmoji | Emoji)[]
|
||||
|
@ -68,7 +68,12 @@ defineExpose({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="isPending || items.length" relative bg-base text-base shadow border="~ base rounded" text-sm py-2 overflow-x-hidden overflow-y-auto max-h-100>
|
||||
<div
|
||||
v-if="isPending || items.length"
|
||||
relative bg-base text-base shadow border="~ base rounded"
|
||||
text-sm py-2 overflow-x-hidden overflow-y-auto max-h-100
|
||||
min-w-40 max-w-50
|
||||
>
|
||||
<template v-if="isPending">
|
||||
<div flex gap-1 items-center p2 animate-pulse>
|
||||
<div i-ri:loader-2-line animate-spin />
|
||||
|
|
Loading…
Reference in a new issue