From 238e363bb6434f6da5d69a4e7c5da7155265ab24 Mon Sep 17 00:00:00 2001
From: Emma Mansell <73774046+7emansell@users.noreply.github.com>
Date: Tue, 3 Dec 2024 12:36:14 -0600
Subject: [PATCH 01/17] VQA fixes
---
src/components/MyAccount/ProfileHeader.tsx | 1 +
src/components/MyAccount/ProfileTabs.tsx | 4 +--
...SettingsTab.tsx => AccountSettingsTab.tsx} | 6 ++--
.../MyAccount/Settings/AddButton.tsx | 2 +-
.../MyAccount/Settings/EditButton.tsx | 7 +++--
.../MyAccount/Settings/PasswordForm.tsx | 15 ++++++---
.../MyAccount/Settings/SettingsInputForm.tsx | 31 ++++++++++++-------
.../MyAccount/Settings/SettingsLabel.tsx | 8 ++---
.../MyAccount/Settings/SettingsSelectForm.tsx | 26 +++++++++-------
.../MyAccount/Settings/StatusBanner.tsx | 12 ++-----
.../MyAccount/Settings/UsernameForm.tsx | 8 +++--
11 files changed, 70 insertions(+), 50 deletions(-)
rename src/components/MyAccount/Settings/{NewAccountSettingsTab.tsx => AccountSettingsTab.tsx} (93%)
diff --git a/src/components/MyAccount/ProfileHeader.tsx b/src/components/MyAccount/ProfileHeader.tsx
index 2acda8126..40a3704fd 100644
--- a/src/components/MyAccount/ProfileHeader.tsx
+++ b/src/components/MyAccount/ProfileHeader.tsx
@@ -95,6 +95,7 @@ const ProfileHeader = ({ patron }: { patron: Patron }) => {
sx={{
border: "none",
h2: { border: "none", paddingTop: 0 },
+ marginBottom: "l",
}}
>
{profileData}
diff --git a/src/components/MyAccount/ProfileTabs.tsx b/src/components/MyAccount/ProfileTabs.tsx
index 7148f3fdf..9da9789dc 100644
--- a/src/components/MyAccount/ProfileTabs.tsx
+++ b/src/components/MyAccount/ProfileTabs.tsx
@@ -6,7 +6,7 @@ import RequestsTab from "./RequestsTab/RequestsTab"
import FeesTab from "./FeesTab/FeesTab"
import { PatronDataContext } from "../../context/PatronDataContext"
import { useContext } from "react"
-import NewAccountSettingsTab from "./Settings/NewAccountSettingsTab"
+import AccountSettingsTab from "./Settings/AccountSettingsTab"
interface ProfileTabsPropsType {
activePath: string
@@ -49,7 +49,7 @@ const ProfileTabs = ({ activePath }: ProfileTabsPropsType) => {
: []),
{
label: "Account settings",
- content: ,
+ content: ,
urlPath: "settings",
},
]
diff --git a/src/components/MyAccount/Settings/NewAccountSettingsTab.tsx b/src/components/MyAccount/Settings/AccountSettingsTab.tsx
similarity index 93%
rename from src/components/MyAccount/Settings/NewAccountSettingsTab.tsx
rename to src/components/MyAccount/Settings/AccountSettingsTab.tsx
index 7a4ae694f..1147919b0 100644
--- a/src/components/MyAccount/Settings/NewAccountSettingsTab.tsx
+++ b/src/components/MyAccount/Settings/AccountSettingsTab.tsx
@@ -8,7 +8,7 @@ import { StatusBanner } from "./StatusBanner"
type StatusType = "" | "failure" | "success"
-const NewAccountSettingsTab = () => {
+const AccountSettingsTab = () => {
const {
updatedAccountData: { patron, pickupLocations },
} = useContext(PatronDataContext)
@@ -41,7 +41,7 @@ const NewAccountSettingsTab = () => {
)}
-
+
{
)
}
-export default NewAccountSettingsTab
+export default AccountSettingsTab
diff --git a/src/components/MyAccount/Settings/AddButton.tsx b/src/components/MyAccount/Settings/AddButton.tsx
index 33f1da869..48bf98be7 100644
--- a/src/components/MyAccount/Settings/AddButton.tsx
+++ b/src/components/MyAccount/Settings/AddButton.tsx
@@ -16,7 +16,7 @@ const AddButton = ({ inputType, label, onClick }: AddButtonProps) => {
sx={{
justifyContent: "flex-start",
width: { base: "100%", md: "300px" },
- paddingLeft: { base: "m", md: "unset" },
+ paddingLeft: { base: "m", md: "xs" },
paddingTop: "xs",
paddingBottom: "xs",
paddingRight: "xs",
diff --git a/src/components/MyAccount/Settings/EditButton.tsx b/src/components/MyAccount/Settings/EditButton.tsx
index edff21264..88ad45160 100644
--- a/src/components/MyAccount/Settings/EditButton.tsx
+++ b/src/components/MyAccount/Settings/EditButton.tsx
@@ -2,19 +2,22 @@ import { Button, Icon } from "@nypl/design-system-react-components"
type EditButtonProps = {
buttonId: string
+ buttonLabel: string
onClick: () => void
}
-const EditButton = ({ buttonId, onClick }: EditButtonProps) => {
+const EditButton = ({ buttonId, buttonLabel, onClick }: EditButtonProps) => {
return (