Removed duplicate styling code from component files
This commit is contained in:
1 parent
f563629e69
commit
db652852f1
8 files changed
+147
-220
No files matched your search
@@ -40,29 +40,22 @@ const PasswordPanel = () => {
|
||||
}, 2000);
|
||||
};
|
||||
return (
|
||||
<TabPanel
|
||||
value="1"
|
||||
sx={{ padding: "0", marginTop: theme.spacing(6.25), width: "100%" }}
|
||||
>
|
||||
<TabPanel value="1">
|
||||
<form className="edit-password-form" noValidate spellCheck="false">
|
||||
<div className="edit-password-form__wrapper">
|
||||
<AnnouncementsDualButtonWithIcon
|
||||
icon={<InfoOutlinedIcon style={{ fill: "#344054" }} />}
|
||||
icon={<InfoOutlinedIcon style={{ fill: theme.palette.secondary.main }} />}
|
||||
subject="SSO login"
|
||||
body="Since you logged in via SSO, you cannot reset or modify your password."
|
||||
/>
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack
|
||||
direction="column"
|
||||
gap="8px"
|
||||
sx={{ flex: 1, marginRight: "10px" }}
|
||||
>
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Current Password
|
||||
</Typography>
|
||||
</Stack>
|
||||
<FormControl sx={{ flex: 1, minWidth: theme.spacing(30) }}>
|
||||
<FormControl sx={{ flex: 1 }}>
|
||||
<OutlinedInput
|
||||
id="edit-current-password"
|
||||
value="RandomPasswordLol"
|
||||
@@ -80,11 +73,7 @@ const PasswordPanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
{!showPassword ? (
|
||||
<VisibilityOff sx={{ fill: "#98A2B3" }} />
|
||||
) : (
|
||||
<Visibility sx={{ fill: "#98A2B3" }} />
|
||||
)}
|
||||
{!showPassword ? <VisibilityOff /> : <Visibility />}
|
||||
</IconButton>
|
||||
</InputAdornment>
|
||||
}
|
||||
@@ -92,16 +81,12 @@ const PasswordPanel = () => {
|
||||
</FormControl>
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack
|
||||
direction="column"
|
||||
gap="8px"
|
||||
sx={{ flex: 1, marginRight: "10px" }}
|
||||
>
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Password
|
||||
</Typography>
|
||||
</Stack>
|
||||
<FormControl sx={{ flex: 1, minWidth: theme.spacing(30) }}>
|
||||
<FormControl sx={{ flex: 1 }}>
|
||||
<OutlinedInput
|
||||
id="edit-password"
|
||||
value="RandomPasswordLol"
|
||||
@@ -119,11 +104,7 @@ const PasswordPanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
{!showPassword ? (
|
||||
<VisibilityOff sx={{ fill: "#98A2B3" }} />
|
||||
) : (
|
||||
<Visibility sx={{ fill: "#98A2B3" }} />
|
||||
)}
|
||||
{!showPassword ? <VisibilityOff /> : <Visibility />}
|
||||
</IconButton>
|
||||
</InputAdornment>
|
||||
}
|
||||
@@ -131,27 +112,19 @@ const PasswordPanel = () => {
|
||||
</FormControl>
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack
|
||||
direction="column"
|
||||
gap="8px"
|
||||
sx={{ flex: 1, marginRight: "10px" }}
|
||||
>
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Confirm new password
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Box sx={{ flex: 1, minWidth: theme.spacing(30) }}>
|
||||
<Box sx={{ flex: 1 }}>
|
||||
<AnnouncementsDualButtonWithIcon
|
||||
icon={<WarningAmberOutlinedIcon style={{ fill: "#f79009" }} />}
|
||||
body="New password must contain at least 8 characters and must have at least one uppercase letter, one number and one symbol."
|
||||
/>
|
||||
</Box>
|
||||
</div>
|
||||
<Divider
|
||||
aria-hidden="true"
|
||||
width="0"
|
||||
sx={{ marginY: theme.spacing(6.25) }}
|
||||
/>
|
||||
<Divider aria-hidden="true" width="0" />
|
||||
<Stack direction="row" justifyContent="flex-end">
|
||||
<Box width="fit-content">
|
||||
<ButtonSpinner
|
||||
@@ -162,11 +135,6 @@ const PasswordPanel = () => {
|
||||
loadingText="Saving..."
|
||||
sx={{
|
||||
paddingX: "40px",
|
||||
height: "fit-content",
|
||||
fontSize: "13px",
|
||||
"&:focus": {
|
||||
outline: "none",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
@@ -177,7 +145,7 @@ const PasswordPanel = () => {
|
||||
};
|
||||
|
||||
PasswordPanel.propTypes = {
|
||||
// No props are being passed to this component, hence no specific PropTypes are defined.
|
||||
};
|
||||
// No props are being passed to this component, hence no specific PropTypes are defined.
|
||||
};
|
||||
|
||||
export default PasswordPanel;
|
||||
Reference in new issue
Block a user