mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-11 11:27:03 +00:00
Tweak reaction buttons
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import cx from "classnames"
|
||||||
import {onMount} from "svelte"
|
import {onMount} from "svelte"
|
||||||
import type {Snippet} from "svelte"
|
import type {Snippet} from "svelte"
|
||||||
import {groupBy, sum, uniq, uniqBy, batch, displayList} from "@welshman/lib"
|
import {groupBy, sum, uniq, uniqBy, batch, displayList} from "@welshman/lib"
|
||||||
@@ -134,10 +135,15 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
data-tip={tooltip}
|
data-tip={tooltip}
|
||||||
class="flex-inline btn btn-neutral btn-xs gap-1 rounded-full text-xs font-normal {reactionClass}"
|
class={cx(
|
||||||
class:tooltip={!noTooltip && !isMobile}
|
reactionClass,
|
||||||
class:btn-neutral={!isOwn}
|
"flex-inline btn btn-outline btn-neutral btn-xs gap-1 rounded-full text-xs font-normal",
|
||||||
class:btn-primary={isOwn}>
|
{
|
||||||
|
tooltip: !noTooltip && !isMobile,
|
||||||
|
"border-neutral-content/20": !isOwn,
|
||||||
|
"btn-primary": isOwn,
|
||||||
|
},
|
||||||
|
)}>
|
||||||
<Reaction event={zaps[0].request} />
|
<Reaction event={zaps[0].request} />
|
||||||
<span>{amount}</span>
|
<span>{amount}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -151,10 +157,15 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
data-tip={tooltip}
|
data-tip={tooltip}
|
||||||
class="flex-inline btn btn-neutral btn-xs gap-1 rounded-full font-normal {reactionClass}"
|
class={cx(
|
||||||
class:tooltip={!noTooltip && !isMobile}
|
reactionClass,
|
||||||
class:btn-neutral={!isOwn}
|
"flex-inline btn btn-outline btn-neutral btn-xs gap-1 rounded-full font-normal",
|
||||||
class:btn-primary={isOwn}
|
{
|
||||||
|
tooltip: !noTooltip && !isMobile,
|
||||||
|
"border-neutral-content/20": !isOwn,
|
||||||
|
"btn-primary": isOwn,
|
||||||
|
},
|
||||||
|
)}
|
||||||
onclick={stopPropagation(preventDefault(onClick))}>
|
onclick={stopPropagation(preventDefault(onClick))}>
|
||||||
<Reaction event={events[0]} />
|
<Reaction event={events[0]} />
|
||||||
{#if events.length > 1}
|
{#if events.length > 1}
|
||||||
|
|||||||
Reference in New Issue
Block a user