diff --git a/Clients/src/presentation/components/Modals/InviteUser/index.tsx b/Clients/src/presentation/components/Modals/InviteUser/index.tsx new file mode 100644 index 00000000..f7713a7c --- /dev/null +++ b/Clients/src/presentation/components/Modals/InviteUser/index.tsx @@ -0,0 +1,158 @@ +/** + * A modal component that displays a form for inviting a user. + * + * @component + * @param {InviteUserModalProps} props - The properties for the InviteUserModal component. + * @param {boolean} props.isOpen - A boolean indicating whether the modal is open. + * @param {function} props.setIsOpen - A function to set the modal's open state. + * @param {function} props.onSendInvite - A function to handle sending the invite. + * + * @returns {JSX.Element} The rendered modal component. + * + * @example + * + */ + +import { + Button, + MenuItem, + Modal, + Stack, + Typography, + useTheme, +} from "@mui/material"; +import React, { useState } from "react"; +import Field from "../../Inputs/Field"; +import Select from "../../Inputs/Select"; + +interface InviteUserModalProps { + isOpen: boolean; + setIsOpen: (isOpen: boolean) => void; + onSendInvite: (email: string, role: string) => void; +} + +const InviteUserModal: React.FC = ({ + isOpen, + setIsOpen, + onSendInvite, +}) => { + const theme = useTheme(); + + const [email, setEmail] = useState(""); + const [role, setRole] = useState(""); + + const handleSendInvite = () => { + onSendInvite(email, role); + setIsOpen(false); + }; + + return ( + setIsOpen(false)}> + + + Invite new team member + + + When you add a new team member, they will get access to all monitors. + + setEmail(e.target.value)} + isRequired + sx={{ + marginBottom: theme.spacing(4), + }} + /> +