Cleanup, comments, e2e

This commit is contained in:
Jesus Vasquez 2024-03-05 17:42:30 -05:00
parent 1e0594a488
commit 8faa5354a8
14 changed files with 288 additions and 232 deletions

View file

@ -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
}