Skip to content

Commit

Permalink
updated all HTML components to MUI components
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-zajzon committed Jul 2, 2024
1 parent cf4ffd9 commit f0f7a5c
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions client/src/components/dashboard/AddTeamMember.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from "react";
import { Box, Button, TextField, Typography } from "@mui/material";
import "../../sass/AddTeamMember.scss";

const AddTeamMember = (props) => {
Expand All @@ -7,42 +8,44 @@ const AddTeamMember = (props) => {
const handleInputChange = (e) => setEmail(e.currentTarget.value);

return (
<div className="flex-container">
<div className="addmember-container">
<Box className="flex-container">
<Box className="addmember-container">
<form
className="form-add-member"
autoComplete="off"
onSubmit={(e) => props.addToTeamHandler(e, email)}
>
<div className="form-row">
<div className="form-input-text">
<label htmlFor="email">Add team member:</label>
<input
type="email"
name="email"
<Box className="form-row">
<Box className="form-input-text">
<TextField
label = "Add team member"
type = "email"
name= "email"
placeholder="Email Address"
value={email.toString()}
onChange={(e) => handleInputChange(e)}
aria-label="Email Address"
autoComplete="none"
required="required"
/>
</div>
</div>
</Box>
</Box>

<div className="form-input-button">
<button
type="submit"
className="addmember-button"
<Box className="form-input-button">
<Button
type="submit"
className="addmember-button"
variant="contained"
color="primary"
>
Add
</button>
</div>
Add
</Button>
</Box>
</form>
{props.isSuccess ? <p className="addmember-success">User Added</p> : null}
<div className="addmember-warning">{props.isError ? props.errorMessage : null}</div>
</div>
</div>
{props.isSuccess && <Typography className="addmember-success">User Added</Typography>}
{props.isError && <Typography className="addmember-warning">{props.errorMessage}</Typography>}
</Box>
</Box>
);
};

Expand Down

0 comments on commit f0f7a5c

Please sign in to comment.