generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes - [feat] Include links in the Error Header that smooth scroll to the field. - [chore] Utilized the figma's validation error messages meant for the user
- Loading branch information
1 parent
43119b0
commit b87ca5b
Showing
5 changed files
with
83 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { ReactNode } from 'react'; | ||
import ErrorIcon from './ErrorIcon'; | ||
|
||
interface Properties { | ||
children: ReactNode | ||
} | ||
|
||
function InputErrorMessage({children}: Properties): JSX.Element { | ||
return ( | ||
<div className="a-form-alert a-form-alert__error mt-2" role="alert"><ErrorIcon /><p className="a-form-alert_text ml-6">{children}</p></div> | ||
|
||
) | ||
} | ||
|
||
export default InputErrorMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export enum formFields { | ||
firstName = "First name", | ||
lastName = "Last name", | ||
email = "Email address", | ||
financialInstitutions = "Associated financial institution(s)" | ||
} | ||
|
||
export enum formFieldsHeaderError { | ||
firstName = "Enter your first name", | ||
lastName = "Enter your last name", | ||
email = "Invalid email address", | ||
financialInstitutions = "Select the financial institution(s) you are associated with" | ||
} |