fix: added reaction icons and option in IconPicker
This commit is contained in:
parent
e81d4abd8c
commit
d9cb2ed683
@ -5,8 +5,28 @@
|
|||||||
<span class="text-base"> {{ modelValue || '' }} </span>
|
<span class="text-base"> {{ modelValue || '' }} </span>
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body="{ togglePopover }">
|
||||||
<div class="my-3 max-w-max transform bg-white px-4 sm:px-0">
|
<div
|
||||||
|
v-if="reaction"
|
||||||
|
class="flex items-center justify-center gap-2 rounded-full bg-white px-2 py-1 shadow-sm"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="size-5 cursor-pointer rounded-full bg-white text-xl"
|
||||||
|
v-for="r in reactionEmojis"
|
||||||
|
:key="r"
|
||||||
|
@click="() => (emoji = r) && togglePopover()"
|
||||||
|
>
|
||||||
|
<button>
|
||||||
|
{{ r }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
class="rounded-full"
|
||||||
|
icon="plus"
|
||||||
|
@click.stop="() => (reaction = false)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else class="my-3 max-w-max transform bg-white px-4 sm:px-0">
|
||||||
<div
|
<div
|
||||||
class="relative max-h-96 overflow-y-auto rounded-lg pb-3 shadow-2xl ring-1 ring-black ring-opacity-5"
|
class="relative max-h-96 overflow-y-auto rounded-lg pb-3 shadow-2xl ring-1 ring-black ring-opacity-5"
|
||||||
>
|
>
|
||||||
@ -31,7 +51,7 @@
|
|||||||
class="h-8 w-8 rounded-md p-1 text-2xl hover:bg-gray-100 focus:outline-none focus:ring focus:ring-blue-200"
|
class="h-8 w-8 rounded-md p-1 text-2xl hover:bg-gray-100 focus:outline-none focus:ring focus:ring-blue-200"
|
||||||
v-for="_emoji in emojis"
|
v-for="_emoji in emojis"
|
||||||
:key="_emoji.description"
|
:key="_emoji.description"
|
||||||
@click="emoji = _emoji.emoji"
|
@click="() => (emoji = _emoji.emoji) && togglePopover()"
|
||||||
:title="_emoji.description"
|
:title="_emoji.description"
|
||||||
>
|
>
|
||||||
{{ _emoji.emoji }}
|
{{ _emoji.emoji }}
|
||||||
@ -50,6 +70,9 @@ import { ref, computed } from 'vue'
|
|||||||
|
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const emoji = defineModel()
|
const emoji = defineModel()
|
||||||
|
const reaction = defineModel('reaction')
|
||||||
|
|
||||||
|
const reactionEmojis = ref(['👍', '❤️', '😂', '😮', '😢', '🙏'])
|
||||||
|
|
||||||
const emojiGroups = computed(() => {
|
const emojiGroups = computed(() => {
|
||||||
let groups = {}
|
let groups = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user