From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- app/components/base/chat/chat/chat-input-area/operation.tsx | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/components/base/chat/chat/chat-input-area/operation.tsx b/app/components/base/chat/chat/chat-input-area/operation.tsx index 122dfcb..56ca863 100644 --- a/app/components/base/chat/chat/chat-input-area/operation.tsx +++ b/app/components/base/chat/chat/chat-input-area/operation.tsx @@ -1,4 +1,7 @@ -import { memo } from 'react' +import { + forwardRef, + memo, +} from 'react' import { RiMicLine, RiSendPlane2Fill, @@ -20,22 +23,17 @@ onSend: () => void theme?: Theme | null } -const Operation = ( - { - ref, - fileConfig, - speechToTextConfig, - onShowVoiceInput, - onSend, - theme, - }: OperationProps & { - ref: React.RefObject<HTMLDivElement>; - }, -) => { +const Operation = forwardRef<HTMLDivElement, OperationProps>(({ + fileConfig, + speechToTextConfig, + onShowVoiceInput, + onSend, + theme, +}, ref) => { return ( <div className={cn( - 'flex shrink-0 items-center justify-end', + 'shrink-0 flex items-center justify-end', )} > <div @@ -50,13 +48,13 @@ size='l' onClick={onShowVoiceInput} > - <RiMicLine className='h-5 w-5' /> + <RiMicLine className='w-5 h-5' /> </ActionButton> ) } </div> <Button - className='ml-3 w-8 px-0' + className='ml-3 px-0 w-8' variant='primary' onClick={onSend} style={ @@ -67,12 +65,12 @@ : {} } > - <RiSendPlane2Fill className='h-4 w-4' /> + <RiSendPlane2Fill className='w-4 h-4' /> </Button> </div> </div> ) -} +}) Operation.displayName = 'Operation' export default memo(Operation) -- Gitblit v1.8.0