slight post UI polish

This commit is contained in:
ari melody 2024-06-30 20:53:51 +01:00
parent c8f38bfd4a
commit 7715e747a2
Signed by: ari
GPG key ID: CF99829C92678188
8 changed files with 185 additions and 202 deletions

View file

@ -0,0 +1,43 @@
<script>
import ReactionButton from './ReactionButton.svelte';
import ReactIcon from '../../../img/icons/react.svg';
export let post;
</script>
<div class="post-reactions" aria-label="Reactions" on:click|stopPropagation on:keydown|stopPropagation>
{#each post.reactions as reaction}
<ReactionButton
type="reaction"
on:click={() => toggleReaction(reaction)}
bind:active={reaction.me}
bind:count={reaction.count}
disabled={reaction.name.includes('@')}
title={reaction.name}
label="">
{#if reaction.url}
<img src={reaction.url} class="emoji" height="20" title={reaction.name} alt={reaction.name}>
{:else}
{reaction.name}
{/if}
</ReactionButton>
{/each}
<ReactionButton
type="reaction"
title="react"
label="React"
disabled>
<ReactIcon/>
</ReactionButton>
</div>
<style>
.post-reactions {
width: fit-content;
height: 32px;
margin-top: 8px;
display: flex;
flex-direction: row;
gap: 2px;
}
</style>