design: a compact comment form until focused
This commit is contained in:
1 parent
32c4a060a1
commit
29432e0e15
4 files changed
+144
-129
No files matched your search
@@ -178,7 +178,9 @@
|
||||
{/if}
|
||||
</div>
|
||||
{#if replying}
|
||||
<div class="max-w-full my-2">
|
||||
<div
|
||||
class="max-w-full my-2 border-l border-slate-200 dark:border-zinc-800 pl-4"
|
||||
>
|
||||
<h1 class="font-bold text-sm mb-2">Reply</h1>
|
||||
<CommentForm
|
||||
{postId}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
export let postId: number
|
||||
export let parentId: number | undefined = undefined
|
||||
export let locked: boolean = false
|
||||
export let rows: number = 7
|
||||
export let placeholder: string | undefined = undefined
|
||||
|
||||
const dispatch = createEventDispatcher<{ comment: CommentResponse }>()
|
||||
|
||||
@@ -64,10 +66,11 @@
|
||||
</div>
|
||||
{:else}
|
||||
<MarkdownEditor
|
||||
rows={7}
|
||||
{...$$restProps}
|
||||
{rows}
|
||||
placeholder={locked
|
||||
? 'This post is locked.'
|
||||
: placeholders.get('comment')}
|
||||
: placeholder ?? placeholders.get('comment')}
|
||||
bind:value
|
||||
disabled={locked || loading}
|
||||
on:confirm={() => {
|
||||
@@ -75,7 +78,7 @@
|
||||
submit()
|
||||
}
|
||||
}}
|
||||
on:confirm
|
||||
on:focus
|
||||
previewButton={previewAction}
|
||||
>
|
||||
{#if actions}
|
||||
|
||||
Reference in new issue
Block a user