Cleanup, comments, e2e
This commit is contained in:
parent
1e0594a488
commit
8faa5354a8
14 changed files with 288 additions and 232 deletions
|
|
@ -1,8 +1,14 @@
|
|||
/**
|
||||
* ErrorMessage Component
|
||||
*
|
||||
* Displays an error message if a form field has been touched and an error exists.
|
||||
*/
|
||||
|
||||
import React from "react"
|
||||
|
||||
const ErrorMessage = ({ touched, error }: { touched: boolean; error?: string }) => {
|
||||
if (touched && error) {
|
||||
return <p className="text-xs text-red-500">{error}</p>
|
||||
return <p className="text-xs text-red-500" role="alert">{error}</p>
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue