Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced HTML with MUI applicable components in multiple files #1702

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated HTML components to MUI components
  • Loading branch information
nora-zajzon committed Jul 17, 2024
commit a10165a08f1a2d8bc0b0f60cc93491015fd7998c
33 changes: 17 additions & 16 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,17 +8,17 @@ 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
<Box className="form-row">
<Box className="form-input-text">
<TextField
label = "Add team member"
type="email"
name="email"
placeholder="Email Address"
Expand All @@ -27,22 +28,22 @@ const AddTeamMember = (props) => {
autoComplete="none"
required="required"
/>
</div>
</div>
</Box>
</Box>

<div className="form-input-button">
<button
<Box className="form-input-button">
<Button
type="submit"
className="addmember-button"
>
Add
</button>
</div>
</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