|
1 | 1 | <script lang="ts"> |
2 | 2 | import { PopoverEmojiPicker } from "@foxui/social"; |
3 | 3 | import { Toggle } from "@foxui/core"; |
4 | | - import Tooltip from "$lib/components/helper/Tooltip.svelte"; |
5 | 4 | import Button from "$lib/components/ui/button/Button.svelte"; |
6 | 5 | import { IconSmilePlus } from "@roomy/design/icons"; |
7 | 6 | import { getAppState } from "$lib/queries"; |
|
69 | 68 | {#if message.reactions.length > 0} |
70 | 69 | <div class="flex gap-2 items-center flex-wrap pl-12 z-10"> |
71 | 70 | {#each Object.entries(sortedReactions) as [emoji, users]} |
72 | | - <Tooltip tip={emoji + " " + Object.values(users).join(", ")}> |
73 | | - {#snippet children()} |
74 | | - {@const count = Object.keys(users).length} |
75 | | - <Toggle |
76 | | - pressed={app.did! in users} |
77 | | - onclick={() => onEmojiButtonClick(emoji)} |
78 | | - class={`h-7 data-[state=on]:bg-accent-400/20 dark:data-[state=on]:bg-accent-500/15 min-w-4 p-1.5 ${count > 1 ? "px-2" : ""}`} |
79 | | - > |
80 | | - <span class={count === 1 ? "" : ""}>{emoji}</span> |
81 | | - {#if count > 1} |
82 | | - <span |
83 | | - class="text-xs font-semibold text-base-900 dark:text-base-100" |
84 | | - > |
85 | | - {Object.keys(users).length} |
86 | | - </span> |
87 | | - {/if} |
88 | | - </Toggle> |
89 | | - {/snippet} |
90 | | - </Tooltip> |
| 71 | + {@const count = Object.keys(users).length} |
| 72 | + <Toggle |
| 73 | + title={emoji + " " + Object.values(users).join(", ")} |
| 74 | + pressed={app.did! in users} |
| 75 | + onclick={() => onEmojiButtonClick(emoji)} |
| 76 | + class={`h-7 data-[state=on]:bg-accent-400/20 dark:data-[state=on]:bg-accent-500/15 min-w-4 p-1.5 ${count > 1 ? "px-2" : ""}`} |
| 77 | + > |
| 78 | + <span class={count === 1 ? "" : ""}>{emoji}</span> |
| 79 | + {#if count > 1} |
| 80 | + <span class="text-xs font-semibold text-base-900 dark:text-base-100"> |
| 81 | + {Object.keys(users).length} |
| 82 | + </span> |
| 83 | + {/if} |
| 84 | + </Toggle> |
91 | 85 | {/each} |
92 | 86 |
|
93 | 87 | <PopoverEmojiPicker |
|
0 commit comments