import { type Component, type JSXElement } from "solid-js"; import { IInputProps } from "./types"; const Input: Component = (props: IInputProps) => { const handleEnter = (e: KeyboardEvent) => { if (e.key === "Enter") { props.onSubmit?.(); } }; const submitHtml = (): JSXElement => ( ); const inputHtml = (): JSXElement => ( props.onChange?.(e.currentTarget.value)} onKeyDown={handleEnter} /> ); const textAreaHtml = (): JSXElement => (