DonationReceipt.tsx
5 months ago
DonationSummaryItems.tsx
1 year ago
FieldDescription.tsx
2 years ago
FieldError.tsx
2 years ago
FieldLabel.tsx
2 years ago
Form.tsx
2 years ago
FormError.tsx
1 year ago
Goal.tsx
1 year ago
GoalAchieved.tsx
2 years ago
Header.tsx
2 years ago
HeaderDescription.tsx
1 year ago
HeaderImage.tsx
2 years ago
HeaderTitle.tsx
2 years ago
MultiStepForm.tsx
2 years ago
NodeWrapper.tsx
2 years ago
Section.tsx
1 year ago
FormError.tsx
18 lines
| 1 | import {__} from '@wordpress/i18n'; |
| 2 | |
| 3 | /** |
| 4 | * @since 4.3.0 Add proper roles and ARIA attributes |
| 5 | */ |
| 6 | export default function FormError({error}: {error: string}) { |
| 7 | return ( |
| 8 | <div role="alert" aria-live="assertive" className="givewp-donation-form__errors"> |
| 9 | <p className="givewp-donation-form__errors__description"> |
| 10 | {__('The following error occurred when submitting the form:', 'give')} |
| 11 | </p> |
| 12 | <ul className="givewp-donation-form__errors__messages"> |
| 13 | <li className="givewp-donation-form__errors__message">{error}</li> |
| 14 | </ul> |
| 15 | </div> |
| 16 | ); |
| 17 | } |
| 18 |