From 8e86d3362bb3e0e9d768db59920e45d8e45b13f2 Mon Sep 17 00:00:00 2001 From: mondaychen Date: Mon, 22 Apr 2024 17:11:24 -0400 Subject: [PATCH] feat: auto size text area in TaskUI --- src/common/AutosizeTextarea.tsx | 2 +- src/common/TaskUI.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/AutosizeTextarea.tsx b/src/common/AutosizeTextarea.tsx index b72da8e..9905e84 100644 --- a/src/common/AutosizeTextarea.tsx +++ b/src/common/AutosizeTextarea.tsx @@ -11,7 +11,7 @@ const AutosizeTextarea = React.forwardRef( w="100%" resize="none" ref={ref} - minRows={1} + minRows={4} as={ResizeTextarea} {...props} /> diff --git a/src/common/TaskUI.tsx b/src/common/TaskUI.tsx index f6c2285..5e04acd 100644 --- a/src/common/TaskUI.tsx +++ b/src/common/TaskUI.tsx @@ -17,6 +17,7 @@ import VoiceButton from "./VoiceButton"; import TaskHistory from "./TaskHistory"; import TaskStatus from "./TaskStatus"; import RecommendedTasks from "./RecommendedTasks"; +import AutosizeTextarea from "./AutosizeTextarea"; function ActionExecutor() { const state = useAppState((state) => ({ @@ -102,12 +103,12 @@ const TaskUI = () => { return ( <> -