Skip to content

Commit e388f1c

Browse files
BrunoQuaresmaEmyrk
authored andcommitted
Minor form spacing and verbiage improvements
1 parent c2aea70 commit e388f1c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

site/src/components/SettingsAccountForm/SettingsAccountForm.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
onChangeTrimmed,
99
} from "../../utils/formUtils"
1010
import { LoadingButton } from "../LoadingButton/LoadingButton"
11-
import { Stack } from "../Stack/Stack"
1211
import { ErrorAlert } from "components/Alert/ErrorAlert"
12+
import { Form, FormFields } from "components/Form/Form"
1313

1414
export interface AccountFormValues {
1515
username: string
@@ -18,7 +18,7 @@ export interface AccountFormValues {
1818
export const Language = {
1919
usernameLabel: "Username",
2020
emailLabel: "Email",
21-
updateSettings: "Update settings",
21+
updateSettings: "Update account",
2222
}
2323

2424
const validationSchema = Yup.object({
@@ -59,8 +59,8 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
5959

6060
return (
6161
<>
62-
<form onSubmit={form.handleSubmit}>
63-
<Stack>
62+
<Form onSubmit={form.handleSubmit}>
63+
<FormFields>
6464
{Boolean(updateProfileError) && (
6565
<ErrorAlert error={updateProfileError} />
6666
)}
@@ -91,8 +91,8 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
9191
{isLoading ? "" : Language.updateSettings}
9292
</LoadingButton>
9393
</div>
94-
</Stack>
95-
</form>
94+
</FormFields>
95+
</Form>
9696
</>
9797
)
9898
}

site/src/components/SettingsLayout/Section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const Section: SectionFC = ({
3535
{(title || description) && (
3636
<div className={styles.header}>
3737
<div>
38-
{title && <Typography variant="h4">{title}</Typography>}
38+
{title && <Typography variant="h4" sx={{ fontSize: 24 }}>{title}</Typography>}
3939
{description && typeof description === "string" && (
4040
<Typography className={styles.description}>
4141
{description}

site/src/components/SettingsSecurityForm/SettingsSecurityForm.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { FC } from "react"
44
import * as Yup from "yup"
55
import { getFormHelpers } from "../../utils/formUtils"
66
import { LoadingButton } from "../LoadingButton/LoadingButton"
7-
import { Stack } from "../Stack/Stack"
87
import { ErrorAlert } from "components/Alert/ErrorAlert"
8+
import { Form, FormFields } from "components/Form/Form"
99

1010
interface SecurityFormValues {
1111
old_password: string
@@ -70,8 +70,8 @@ export const SecurityForm: FC<SecurityFormProps> = ({
7070

7171
return (
7272
<>
73-
<form onSubmit={form.handleSubmit}>
74-
<Stack>
73+
<Form onSubmit={form.handleSubmit}>
74+
<FormFields>
7575
{Boolean(updateSecurityError) && (
7676
<ErrorAlert error={updateSecurityError} />
7777
)}
@@ -106,8 +106,8 @@ export const SecurityForm: FC<SecurityFormProps> = ({
106106
{isLoading ? "" : Language.updatePassword}
107107
</LoadingButton>
108108
</div>
109-
</Stack>
110-
</form>
109+
</FormFields>
110+
</Form>
111111
</>
112112
)
113113
}

0 commit comments

Comments
 (0)