Open a note from anywhere on its card (#630)
This commit is contained in:
parent
a677fa5911
commit
cfc30803b4
2 changed files with 10 additions and 21 deletions
|
|
@ -23,12 +23,10 @@
|
|||
const goToReplies = () => goToEvent(event)
|
||||
</script>
|
||||
|
||||
<div class="card card-interactive flex flex-col gap-3">
|
||||
<NoteItem {event} {context} card={false} interactive>
|
||||
<NoteItem {event} {context}>
|
||||
<Button class="button button-neutral button-xs rounded-full" onclick={goToReplies}>
|
||||
<Icon icon={Reply} size={4} />
|
||||
{replyCount}
|
||||
{replyCount === 1 ? "reply" : "replies"}
|
||||
</Button>
|
||||
</NoteItem>
|
||||
</div>
|
||||
</NoteItem>
|
||||
|
|
|
|||
|
|
@ -13,19 +13,10 @@
|
|||
context: FeedContext
|
||||
url?: string
|
||||
card?: boolean
|
||||
interactive?: boolean
|
||||
showEntire?: boolean
|
||||
}
|
||||
|
||||
const {
|
||||
url,
|
||||
event,
|
||||
children,
|
||||
context,
|
||||
card = true,
|
||||
interactive = card,
|
||||
showEntire = false,
|
||||
}: Props = $props()
|
||||
const {url, event, children, context, card = true, showEntire = false}: Props = $props()
|
||||
</script>
|
||||
|
||||
{#snippet body()}
|
||||
|
|
@ -37,11 +28,11 @@
|
|||
{/snippet}
|
||||
|
||||
{#if card}
|
||||
<Cv tag={NoteCard} {event} {url} {interactive} class="card card-interactive">
|
||||
<Cv tag={NoteCard} {event} {url} interactive class="card card-interactive">
|
||||
{@render body()}
|
||||
</Cv>
|
||||
{:else}
|
||||
<NoteCard {event} {url} {interactive}>
|
||||
<NoteCard {event} {url}>
|
||||
{@render body()}
|
||||
</NoteCard>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Reference in a new issue