Created the TextInput.jsx component

This commit is contained in:
Mathias Wagner 2023-04-18 18:58:42 +02:00
parent 81b30ca3ae
commit ad850c31ca
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -0,0 +1,9 @@
import "./styles.sass";
export const TextInput = ({text, setText, id, type = "text"}) => {
const updateText = (event) => setText(event.target.value);
return (
<input type={type} id={id} onChange={updateText} value={text} />
)
}