Skip to content

Commit

Permalink
added reaction sender on hover & changed hover on line effect
Browse files Browse the repository at this point in the history
  • Loading branch information
TOPetit committed Jan 23, 2023
1 parent bfa87a8 commit 512d210
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions frontend/src/components/tops/TopContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
export let color: { [key: string]: string };
let hovered: Message;
let tooltip: string;
</script>

{#each data as message, index}
Expand All @@ -30,7 +31,23 @@
<div class="content"><p>{message.content}</p></div>
<div class="reactions">
{#each message.reactions as reaction}
<div class="reaction"><p>{reaction.emoji}</p></div>
<div class="reaction">
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<p
on:mouseover={() => {
tooltip = message.formattedDate + reaction.sender;
}}
on:mouseleave={() => {
tooltip = undefined;
}}
>
{#if tooltip == message.formattedDate + reaction.sender}
{reaction.sender}
{:else}
{reaction.emoji}
{/if}
</p>
</div>
{/each}
</div>
</div>
Expand All @@ -49,12 +66,13 @@
display: flex;
justify-content: space-around;
cursor: pointer;
transition: all ease 0.3s;
transition: all ease 0.6s;
outline: 1px solid rgba(169, 169, 169, 1);
}
.message:hover {
scale: 1.05;
min-height: 60px;
font-size: larger;
}
div > div {
Expand Down

0 comments on commit 512d210

Please sign in to comment.