@@ -348,7 +348,7 @@ function ChatInput({
348
348
>
349
349
{ ( { getRootProps, getInputProps } ) => (
350
350
< div
351
- className = "flex flex-col rounded-xl border-1 border-base-content/30 p-3 w-full"
351
+ className = "flex flex-col rounded-xl w-full"
352
352
// when a file is pasted to the input, we handle it here
353
353
// if a text is pasted, and if it is long text, we will convert it to a file
354
354
onPasteCapture = { ( e : ClipboardEvent < HTMLInputElement > ) => {
@@ -390,11 +390,11 @@ function ChatInput({
390
390
/>
391
391
) }
392
392
393
- < div className = "flex flex-row w-full " >
393
+ < div className = "bg-base-200 border-1 border-base-content/30 rounded-lg p-2 flex flex-col " >
394
394
< textarea
395
395
// Default (mobile): Enable vertical resize, overflow auto for scrolling if needed
396
396
// Large screens (lg:): Disable manual resize, apply max-height for autosize limit
397
- className = "text-md outline-none border-none w-full resize-vertical lg:resize -none lg:max-h-48 lg:overflow-y-auto" // Adjust lg:max-h-48 as needed (e.g., lg:max-h-60)
397
+ className = "w-full focus:outline -none px-2 border-none focus:ring-0 resize-none"
398
398
placeholder = "Type a message (Shift+Enter to add a new line)"
399
399
ref = { textarea . ref }
400
400
onInput = { textarea . onInput } // Hook's input handler (will only resize height on lg+ screens)
@@ -413,42 +413,47 @@ function ChatInput({
413
413
> </ textarea >
414
414
415
415
{ /* buttons area */ }
416
- < div className = "flex flex-row gap-2 ml-2" >
417
- < label
418
- htmlFor = "file-upload"
419
- className = { classNames ( {
420
- 'btn w-8 h-8 p-0 rounded-full' : true ,
421
- 'btn-disabled' : isGenerating ,
422
- } ) }
423
- aria-label = "Upload file"
424
- tabIndex = { 0 }
425
- role = "button"
426
- >
427
- < PaperClipIcon className = "h-5 w-5" />
428
- </ label >
429
- < input
430
- id = "file-upload"
431
- type = "file"
432
- disabled = { isGenerating }
433
- { ...getInputProps ( ) }
434
- hidden
435
- />
436
- { isGenerating ? (
437
- < button
438
- className = "btn btn-neutral w-8 h-8 p-0 rounded-full"
439
- onClick = { onStop }
416
+ < div className = "flex items-center justify-between mt-2" >
417
+ < div className = "flex items-center" >
418
+ < label
419
+ htmlFor = "file-upload"
420
+ className = { classNames ( {
421
+ 'btn w-8 h-8 p-0 rounded-full' : true ,
422
+ 'btn-disabled' : isGenerating ,
423
+ } ) }
424
+ aria-label = "Upload file"
425
+ tabIndex = { 0 }
426
+ role = "button"
440
427
>
441
- < StopIcon className = "h-5 w-5" />
442
- </ button >
443
- ) : (
444
- < button
445
- className = "btn btn-primary w-8 h-8 p-0 rounded-full"
446
- onClick = { onSend }
447
- aria-label = "Send message"
448
- >
449
- < ArrowUpIcon className = "h-5 w-5" />
450
- </ button >
451
- ) }
428
+ < PaperClipIcon className = "h-5 w-5" />
429
+ </ label >
430
+ < input
431
+ id = "file-upload"
432
+ type = "file"
433
+ disabled = { isGenerating }
434
+ { ...getInputProps ( ) }
435
+ hidden
436
+ />
437
+ </ div >
438
+
439
+ < div className = "flex items-center" >
440
+ { isGenerating ? (
441
+ < button
442
+ className = "btn btn-neutral w-8 h-8 p-0 rounded-full"
443
+ onClick = { onStop }
444
+ >
445
+ < StopIcon className = "h-5 w-5" />
446
+ </ button >
447
+ ) : (
448
+ < button
449
+ className = "btn btn-primary w-8 h-8 p-0 rounded-full"
450
+ onClick = { onSend }
451
+ aria-label = "Send message"
452
+ >
453
+ < ArrowUpIcon className = "h-5 w-5" />
454
+ </ button >
455
+ ) }
456
+ </ div >
452
457
</ div >
453
458
</ div >
454
459
</ div >
0 commit comments