diff --git a/Client/src/Components/Check/Check.jsx b/Client/src/Components/Check/Check.jsx index 6daf90aa1..501d0a344 100644 --- a/Client/src/Components/Check/Check.jsx +++ b/Client/src/Components/Check/Check.jsx @@ -1,6 +1,8 @@ import "./check.css"; -import React from "react"; -import CheckGrey from "../../assets/Images/Check-icon-grey.png"; +import PropTypes from "prop-types"; +import CheckGrey from "../../assets/icons/check.svg?react"; +import { Stack, Typography } from "@mui/material"; +import { useTheme } from "@emotion/react"; /** * `Check` is a functional React component that displays a check icon and a label. @@ -8,6 +10,7 @@ import CheckGrey from "../../assets/Images/Check-icon-grey.png"; * @component * @param {Object} props - The properties that define the `Check` component. * @param {string} props.text - The text to be displayed as the label next to the check icon. + * @param {'info' | 'error' | 'success'} [props.variant='info'] - The variant of the check component, affecting its styling. * * @example * // To use this component, import it and use it in your JSX like this: @@ -15,14 +18,30 @@ import CheckGrey from "../../assets/Images/Check-icon-grey.png"; * * @returns {React.Element} The `Check` component with a check icon and a label, defined by the `text` prop. */ -const Check = ({ text }) => { +const Check = ({ text, variant = "info" }) => { + const theme = useTheme(); return ( -
- un-checked -
- -
+ + + {text} + ); }; +Check.propTypes = { + text: PropTypes.string.isRequired, + variant: PropTypes.oneOf(["info", "error", "success"]), +}; + export default Check; diff --git a/Client/src/Components/Check/check.css b/Client/src/Components/Check/check.css index 17f372f2b..cb24be466 100644 --- a/Client/src/Components/Check/check.css +++ b/Client/src/Components/Check/check.css @@ -1,20 +1,17 @@ -.check { - display: flex; - align-items: center; - justify-content: start; -} - -.check-icon { - width: var(--env-var-img-width-1); - height: var(--env-var-img-width-1); -} - -.check-h-spacing { - margin-right: 8px; -} - -.check-label { - font-size: var(--env-var-font-size-small); - font-weight: 600; +.check span.MuiTypography-root { + font-size: var(--env-var-font-size-small-plus); color: var(--env-var-color-2); + opacity: 0.8; +} +.check-error span.MuiTypography-root { + color: var(--env-var-color-24); +} +.check-error svg > path { + fill: var(--env-var-color-19); +} +.check-success span.MuiTypography-root { + color: var(--env-var-color-17); +} +.check-success svg > path { + fill: var(--env-var-color-23); } diff --git a/Client/src/Pages/Login/index.css b/Client/src/Pages/Login/index.css index 8238816fd..2c47d5807 100644 --- a/Client/src/Pages/Login/index.css +++ b/Client/src/Pages/Login/index.css @@ -16,7 +16,7 @@ color: var(--env-var-color-2); opacity: 0.8; } -.login-page button { +.login-page button:not(.MuiIconButton-root) { height: 34px; border-radius: var(--env-var-radius-2); line-height: 0; diff --git a/Client/src/Pages/Register/index.css b/Client/src/Pages/Register/index.css index dbc3c0fac..a66505ce6 100644 --- a/Client/src/Pages/Register/index.css +++ b/Client/src/Pages/Register/index.css @@ -18,7 +18,7 @@ color: var(--env-var-color-2); opacity: 0.8; } -.register-page button { +.register-page button:not(.MuiIconButton-root) { height: 34px; border-radius: var(--env-var-radius-2); line-height: 0; @@ -26,6 +26,12 @@ .register-page svg rect { fill: none; } +.register-page + .MuiFormControl-root:has(#register-password-input) + + span.MuiTypography-root { + display: none; + visibility: hidden; +} .register-form { margin-top: 102px; diff --git a/Client/src/Pages/Register/index.jsx b/Client/src/Pages/Register/index.jsx index e6eed1645..9c324b3a2 100644 --- a/Client/src/Pages/Register/index.jsx +++ b/Client/src/Pages/Register/index.jsx @@ -199,9 +199,44 @@ const Register = () => { error={errors.confirm} /> - - - + + +