Skip to content

Commit

Permalink
Fixed settings page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
MandeepPaul committed Jan 2, 2025
1 parent 8ee575b commit 246bcb2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "./CustomTextFieldStyles.css";
const CustomTextField = ({
id = "",
name = "",
className,
checkCircleIconVisible = false,
displayCheckCircleIcon = false,
labelText = "",
Expand Down Expand Up @@ -37,7 +38,7 @@ const CustomTextField = ({
const computedFullWidth = fullWidth ||
["full", "100%", "stretch"].some(value => TextFieldWidth.toLowerCase().includes(value));
return (
<div style={{ ...style, ...(computedFullWidth && { width: '100%' })}}>
<div className={...className} style={{ ...style, ...(computedFullWidth && { width: '100%' })}}>
{!checkCircleIconVisible &&
<div>
<InputLabel sx={{ fontWeight: labelFontWeight, margin: 0 }}>{labelText}</InputLabel>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/scenes/settings/ProfileTab/ProfileTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const ProfileTab = () => {
value={formData.name}
onChange={handleInputChange}
placeholder="Enter your first name"
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand All @@ -148,7 +148,7 @@ const ProfileTab = () => {
placeholder="Enter your last name"
value={formData.surname}
onChange={handleInputChange}
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand All @@ -168,7 +168,7 @@ const ProfileTab = () => {
placeholder="Enter your email"
value={userInfo.email}
disabled={true} // Disabled since it cannot be changed
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand Down
26 changes: 17 additions & 9 deletions frontend/src/scenes/settings/ProfileTab/ProfileTab.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.form {
padding-bottom: 20px;
width: 864px;
border-bottom: 1px solid #EEEEEE;
}

Expand All @@ -18,7 +19,17 @@
.photoAlign{
display: flex;
align-items: center;
gap: 2.5rem;
gap: 7rem;
}

.supportText {
margin: 0;
min-width: 400px;
color: var(--second-text-color);
font-size: var(--font-regular);
font-weight: 400;
line-height: 20px;
margin-top: 6px;
}

.photoOptions {
Expand All @@ -38,22 +49,19 @@

.label {
font-size: var(--font-regular);
min-width: 400px;
font-weight: 700;
line-height: 20px;
text-align: left;
flex-grow: 1;
margin: 0;
}

.supportText {
margin: 0;
color: var(--second-text-color);
font-size: var(--font-regular);
font-weight: 400;
line-height: 20px;
margin-top: 6px;
.textField {
flex-grow: 1;
text-align: right;
}

.update,
.delete{
border: none;
Expand Down

0 comments on commit 246bcb2

Please sign in to comment.