({onChangeForm, createUser })
| 2 | |
| 3 | |
| 4 | const CreateUser = ({onChangeForm, createUser }) => { |
| 5 | |
| 6 | |
| 7 | return( |
| 8 | <div className="container"> |
| 9 | <div className="row"> |
| 10 | <div className="col-md-7 mrgnbtm"> |
| 11 | <h2>Create User</h2> |
| 12 | <form> |
| 13 | <div className="row"> |
| 14 | <div className="form-group col-md-6"> |
| 15 | <label htmlFor="exampleInputEmail1">First Name</label> |
| 16 | <input type="text" onChange={(e) => onChangeForm(e)} className="form-control" name="firstname" id="firstname" aria-describedby="emailHelp" placeholder="First Name" /> |
| 17 | </div> |
| 18 | <div className="form-group col-md-6"> |
| 19 | <label htmlFor="exampleInputPassword1">Last Name</label> |
| 20 | <input type="text" onChange={(e) => onChangeForm(e)} className="form-control" name="lastname" id="lastname" placeholder="Last Name" /> |
| 21 | </div> |
| 22 | </div> |
| 23 | <div className="row"> |
| 24 | <div className="form-group col-md-12"> |
| 25 | <label htmlFor="exampleInputEmail1">Email</label> |
| 26 | <input type="text" onChange={(e) => onChangeForm(e)} className="form-control" name="email" id="email" aria-describedby="emailHelp" placeholder="Email" /> |
| 27 | </div> |
| 28 | </div> |
| 29 | <button type="button" onClick= {(e) => createUser()} className="btn btn-danger">Create</button> |
| 30 | </form> |
| 31 | </div> |
| 32 | </div> |
| 33 | </div> |
| 34 | ) |
| 35 | } |
| 36 | |
| 37 | export default CreateUser |
nothing calls this directly
no outgoing calls
no test coverage detected