From 5f8f6f98c2c47ca878aadb893b0d64a0c66316aa Mon Sep 17 00:00:00 2001 From: rohan09-raj Date: Tue, 2 Aug 2022 00:06:39 +0530 Subject: added useState and made input functional --- client/src/components/Input/Input.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/components/Input') diff --git a/client/src/components/Input/Input.jsx b/client/src/components/Input/Input.jsx index ee79f3b..5987e27 100644 --- a/client/src/components/Input/Input.jsx +++ b/client/src/components/Input/Input.jsx @@ -1,7 +1,7 @@ import React from 'react' import styles from './Input.module.css' -const Input = ({ label, id, value, type, name }) => { +const Input = ({ label, id, value, type, name, onChange, placeholder }) => { return (
@@ -12,7 +12,9 @@ const Input = ({ label, id, value, type, name }) => { id={id} name={name} value={value} + onChange={onChange} required + placeholder={placeholder} />
-- cgit