misc: tweak line height
This commit is contained in:
1 parent
fcb21a0e35
commit
a362241a72
3 files changed
+52
-27
No files matched your search
@@ -71,6 +71,7 @@
|
||||
postId={node.comment_view.comment.id}
|
||||
bind:value={newComment}
|
||||
actions={false}
|
||||
preview={true}
|
||||
/>
|
||||
</Modal>
|
||||
{/if}
|
||||
@@ -142,7 +143,7 @@
|
||||
class="flex flex-col whitespace-pre-wrap
|
||||
max-w-full gap-1"
|
||||
>
|
||||
<div class="max-w-full mt-0.5 break-words text-sm leading-[22px]">
|
||||
<div class="max-w-full mt-0.5 break-words text-sm">
|
||||
<Markdown source={node.comment_view.comment.content} />
|
||||
</div>
|
||||
{#if actions}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
|
||||
export let postId: number
|
||||
export let parentId: number | undefined = undefined
|
||||
@@ -16,7 +18,11 @@
|
||||
export let value = ''
|
||||
export let actions = true
|
||||
|
||||
let previewAction = true
|
||||
export { previewAction as preview }
|
||||
|
||||
let loading = false
|
||||
let preview = false
|
||||
|
||||
async function submit() {
|
||||
if (!$user || !$authData || value == '') return
|
||||
@@ -52,26 +58,44 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-2 relative">
|
||||
<TextArea
|
||||
rows={4}
|
||||
placeholder={locked ? 'This post is locked.' : 'What are you thinking?'}
|
||||
class="!bg-slate-100 dark:!bg-zinc-900"
|
||||
bind:value
|
||||
disabled={locked}
|
||||
/>
|
||||
{#if actions}
|
||||
<div class="sm:ml-auto sm:w-28">
|
||||
<Button
|
||||
large
|
||||
on:click={submit}
|
||||
color="primary"
|
||||
size="lg"
|
||||
class="w-full"
|
||||
{loading}
|
||||
disabled={locked || loading}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
{#if preview}
|
||||
<div
|
||||
class="bg-slate-100 dark:bg-zinc-900 px-3 py-2.5 h-[102px] border
|
||||
border-slate-300 dark:border-zinc-700 rounded-md overflow-auto text-sm"
|
||||
>
|
||||
<Markdown source={value} />
|
||||
</div>
|
||||
{:else}
|
||||
<TextArea
|
||||
rows={4}
|
||||
placeholder={locked ? 'This post is locked.' : 'What are you thinking?'}
|
||||
class="!bg-slate-100 dark:!bg-zinc-900"
|
||||
bind:value
|
||||
disabled={locked}
|
||||
/>
|
||||
{/if}
|
||||
{#if actions || previewAction}
|
||||
<div class="flex flex-row items-center justify-between">
|
||||
{#if previewAction}
|
||||
<MultiSelect
|
||||
options={[false, true]}
|
||||
optionNames={['Edit', 'Preview']}
|
||||
bind:selected={preview}
|
||||
/>
|
||||
{/if}
|
||||
{#if actions}
|
||||
<Button
|
||||
large
|
||||
on:click={submit}
|
||||
color="primary"
|
||||
size="lg"
|
||||
class="sm:ml-auto w-28"
|
||||
{loading}
|
||||
disabled={locked || loading}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in new issue
Block a user