diff --git a/src/components/ExtendedTextarea.svelte b/src/components/ExtendedTextarea.svelte index 75d03da25..9bf59700d 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -13,6 +13,8 @@ import * as utils from "@app/lib/utils"; import Button from "@app/components/Button.svelte"; + import { hints } from "@app/lib/hints"; + import Icon from "@app/components/Icon.svelte"; import Markdown from "@app/components/Markdown.svelte"; import Textarea from "@app/components/Textarea.svelte"; @@ -290,6 +292,38 @@ margin-left: 0.25rem; } + .textarea-wrap { + position: relative; + display: flex; + width: 100%; + flex: 1; + } + .markdown-hint { + position: absolute; + bottom: 0.375rem; + right: 0.5rem; + display: flex; + align-items: center; + gap: 0.375rem; + color: var(--color-text-quaternary); + opacity: 0.6; + -webkit-user-select: none; + user-select: none; + } + .markdown-hint-dismiss { + background: none; + border: 1px solid var(--color-border-subtle); + border-radius: var(--border-radius-sm); + color: inherit; + cursor: pointer; + font: var(--txt-body-s-regular); + padding: 0 0.375rem; + line-height: 1.25rem; + } + .markdown-hint-dismiss:hover { + background-color: var(--color-surface-subtle); + color: var(--color-text-secondary); + } .preview { width: 100%; font: var(--txt-body-m-regular); @@ -308,30 +342,48 @@
- {#if preview} -
- {#if body.trim().length === 0} - Nothing to preview. - {:else} - +
+ {#if preview} +
+ {#if body.trim().length === 0} + Nothing to preview. + {:else} + + {/if} +
+ {:else} +