@@ -122,11 +122,11 @@ export function Sender({
122122 const [ isSending , setIsSending ] = useState ( false ) ;
123123
124124 useEffect ( ( ) => {
125- onMessageChange ?.( message ) ;
126125 if ( textareaRef . current ) {
127126 textareaRef . current . style . height = "auto" ;
128127 textareaRef . current . style . height = `${ textareaRef . current . scrollHeight } px` ;
129128 }
129+ onMessageChange ?.( message ) ;
130130 } , [ message , onMessageChange ] ) ;
131131
132132 const [ controller , setController ] = useState < AbortController | null > ( null ) ;
@@ -180,7 +180,7 @@ export function Sender({
180180 data-slot = "sender"
181181 className = { twMerge (
182182 clsx (
183- "flex flex-col items-center border rounded-2xl" ,
183+ "px-1 flex flex-col items-center border rounded-2xl" ,
184184 "border-gray-200 dark:border-gray-700 shadow-sm transition-all duration-300 hover:shadow-md" ,
185185 "focus-within:ring-2 focus-within:ring-blue-500 focus-within:border-blue-500" ,
186186 className ,
@@ -195,9 +195,14 @@ export function Sender({
195195 onKeyDown = { handleKeyDown }
196196 placeholder = { placeholder }
197197 className = { clsx (
198- "w-full pt-4 px-4 border-0 rounded-2xl !resize-none" ,
198+ "w-full pt-4 px-4 border-0 rounded-2xl !resize-none bg-transparent " ,
199199 "focus:ring-0 focus:outline-none text-gray-700 placeholder-gray-400" ,
200200 "overflow-y-auto max-h-32" ,
201+ "[scrollbar-gutter:stable] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full" ,
202+ "[&::-webkit-scrollbar-thumb]:cursor-auto" ,
203+ "[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-gray-600" ,
204+ "[&::-webkit-scrollbar-thumb:hover]:bg-gray-400 dark:[&::-webkit-scrollbar-thumb:hover]:bg-gray-500" ,
205+ "[&::-webkit-scrollbar-track]:mt-3"
201206 ) }
202207 rows = { 2 }
203208 />
0 commit comments