import { useEffect, useRef, useState } from "preact/hooks"; import { msg_style } from "style"; import { Conversation, Database, Message } from "types"; export default function InputMsg({ msg, db, conversation, onInput, onSubmit, ...props }: { msg: Message; db: Database; conversation?: Conversation; onInput: (e: any) => void; onSubmit: () => void; }) { return ( e.key == "Enter" && onSubmit()} type="text" {...props} > ); }