mirror of
https://github.com/rjNemo/MERN_sample_app
synced 2026-06-06 08:46:39 +00:00
add signinpage
This commit is contained in:
parent
93cffcb826
commit
4c2ca94013
1 changed files with 22 additions and 0 deletions
22
client/src/components/InputField/index.jsx
Normal file
22
client/src/components/InputField/index.jsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import React from "react";
|
||||
import { Label, Input } from "reactstrap";
|
||||
|
||||
const useStyles = () => ({
|
||||
inputField: {
|
||||
paddingBottom: "1rem",
|
||||
},
|
||||
});
|
||||
|
||||
const InputField = ({ id, label, set, type = "text" }) => {
|
||||
const handleChange = (e) => set(e.target.value);
|
||||
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<div style={styles.inputField}>
|
||||
<Label for={id}>{label}</Label>
|
||||
<Input type={type} id={id} onChange={handleChange} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default InputField;
|
||||
Loading…
Reference in a new issue