mirror of https://github.com/msgbyte/tailchat
refactor(web): 发送消息
parent
99b1a9f67e
commit
f5cd580175
@ -0,0 +1,14 @@
|
|||||||
|
import { Input } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface ChatInputBoxProps {
|
||||||
|
onSendMsg: (msg: string) => void;
|
||||||
|
}
|
||||||
|
export const ChatInputBox: React.FC<ChatInputBoxProps> = React.memo((props) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Input onPressEnter={(e) => props.onSendMsg(e.currentTarget.value)} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
ChatInputBox.displayName = 'ChatInputBox';
|
Loading…
Reference in New Issue