more consistent theming

This commit is contained in:
Vinzenz Schroeter 2024-04-14 11:16:34 +02:00
commit f7e20fc608

View file

@ -0,0 +1,21 @@
import {ChangeEventHandler} from "react";
import './TextInput.css';
export default function TextInput(props: {
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
className?: string;
value: string;
placeholder: string;
onEnter?: () => void;
}) {
return <input
{...props}
type="text"
className={'TextInput ' + (props.className?? '')}
onKeyUp={event => {
if (props.onEnter && event.key === 'Enter')
props.onEnter();
}}
/>;
}