Replace single-line reply input with resizable textarea in QuestionSplitView

This commit is contained in:
2026-05-19 18:01:27 +05:00
parent 751c012f3d
commit acf7ee49aa
@@ -323,11 +323,10 @@ export function QuestionSplitView({ currentUserId }: { currentUserId: string })
style={{ borderTop: "1px solid var(--border)" }}
>
<div
className="flex gap-2"
className="flex flex-col gap-2"
style={{ opacity: detail.status === "CLOSED" ? 0.5 : 1 }}
>
<input
type="text"
<textarea
value={replyText}
onChange={(e) => setReplyText(e.target.value)}
onKeyDown={(e) => {
@@ -340,13 +339,15 @@ export function QuestionSplitView({ currentUserId }: { currentUserId: string })
placeholder={
detail.status === "CLOSED" ? "Вопрос закрыт" : "Написать ответ..."
}
className="flex-1 text-sm px-3 py-2 outline-none"
rows={4}
className="w-full text-sm px-3 py-2 outline-none resize-y"
style={{
border: "1px solid var(--border)",
background: "var(--background)",
color: "var(--foreground)",
}}
/>
<div className="flex justify-end">
<button
onClick={handleReply}
disabled={sending || !replyText.trim() || detail.status === "CLOSED"}
@@ -355,12 +356,13 @@ export function QuestionSplitView({ currentUserId }: { currentUserId: string })
background: "var(--foreground)",
color: "var(--background)",
border: "none",
opacity: sending ? 0.6 : 1,
opacity: sending || !replyText.trim() ? 0.5 : 1,
}}
>
{sending ? "..." : "Отправить"}
{sending ? "..." : "Отправить"}
</button>
</div>
</div>
{error && (
<p className="text-xs mt-1" style={{ color: "var(--destructive)" }}>
{error}