Created the TextInput.jsx component
This commit is contained in:
parent
81b30ca3ae
commit
ad850c31ca
9
src/common/components/TextInput/TextInput.jsx
Normal file
9
src/common/components/TextInput/TextInput.jsx
Normal 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} />
|
||||||
|
)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user