From db652852f1bf95d3168935281b9334e59128883f Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Fri, 21 Jun 2024 19:08:42 -0400 Subject: [PATCH] Removed duplicate styling code from component files --- Client/src/Components/Button/index.jsx | 3 + Client/src/Components/ButtonSpinner/index.jsx | 8 +- .../ProfileSettings/PasswordPanel.jsx | 58 +++------- .../ProfileSettings/ProfilePanel.jsx | 65 ++--------- .../TabPanels/ProfileSettings/TeamPanel.jsx | 98 +++++----------- Client/src/Pages/Settings/index.css | 109 +++++++++++------- Client/src/Pages/Settings/index.jsx | 5 +- Client/src/index.css | 21 +++- 8 files changed, 147 insertions(+), 220 deletions(-) diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/index.jsx index 72c438514..fe8912255 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/index.jsx @@ -59,6 +59,9 @@ const Button = ({ type, level, label, disabled, img, onClick, sx }) => { onClick={onClick} sx={{ textTransform: "none", + "&:focus": { + outline: "none", + }, ...sx, }} > diff --git a/Client/src/Components/ButtonSpinner/index.jsx b/Client/src/Components/ButtonSpinner/index.jsx index f584d1cac..7f89f1ab9 100644 --- a/Client/src/Components/ButtonSpinner/index.jsx +++ b/Client/src/Components/ButtonSpinner/index.jsx @@ -70,7 +70,13 @@ const ButtonSpinner = ({ endIcon={position === "end" && img} onClick={onClick} loading={isLoading} - sx={{ textTransform: "none", ...sx }} + sx={{ + textTransform: "none", + "&:focus": { + outline: "none", + }, + ...sx, + }} > {label} diff --git a/Client/src/Components/TabPanels/ProfileSettings/PasswordPanel.jsx b/Client/src/Components/TabPanels/ProfileSettings/PasswordPanel.jsx index 8343a9819..3297c8e86 100644 --- a/Client/src/Components/TabPanels/ProfileSettings/PasswordPanel.jsx +++ b/Client/src/Components/TabPanels/ProfileSettings/PasswordPanel.jsx @@ -40,29 +40,22 @@ const PasswordPanel = () => { }, 2000); }; return ( - +
} + icon={} subject="SSO login" body="Since you logged in via SSO, you cannot reset or modify your password." />
- + Current Password - + { }, }} > - {!showPassword ? ( - - ) : ( - - )} + {!showPassword ? : } } @@ -92,16 +81,12 @@ const PasswordPanel = () => {
- + Password - + { }, }} > - {!showPassword ? ( - - ) : ( - - )} + {!showPassword ? : } } @@ -131,27 +112,19 @@ const PasswordPanel = () => {
- + Confirm new password - + } body="New password must contain at least 8 characters and must have at least one uppercase letter, one number and one symbol." />
-