Amount
1 month ago
Consent
1 year ago
utils
1 year ago
Checkbox.tsx
1 year ago
Date.tsx
1 year ago
Email.tsx
1 year ago
File.tsx
1 year ago
Gateways.tsx
1 year ago
Hidden.tsx
2 years ago
Honeypot.tsx
1 year ago
MultiSelect.tsx
2 years ago
Password.tsx
2 years ago
Phone.tsx
1 year ago
Radio.tsx
2 years ago
Select.tsx
1 year ago
Text.tsx
1 year ago
TextArea.tsx
2 years ago
Url.tsx
2 years ago
TextArea.tsx
28 lines
| 1 | import type {TextareaProps} from '@givewp/forms/propTypes'; |
| 2 | |
| 3 | export default function TextArea({ |
| 4 | Label, |
| 5 | ErrorMessage, |
| 6 | placeholder, |
| 7 | fieldError, |
| 8 | inputProps, |
| 9 | description, |
| 10 | rows, |
| 11 | }: TextareaProps) { |
| 12 | const FieldDescription = window.givewp.form.templates.layouts.fieldDescription; |
| 13 | |
| 14 | return ( |
| 15 | <label> |
| 16 | <Label /> |
| 17 | {description && <FieldDescription description={description} />} |
| 18 | <textarea |
| 19 | aria-invalid={fieldError ? 'true' : 'false'} |
| 20 | {...inputProps} |
| 21 | placeholder={placeholder} |
| 22 | rows={rows} |
| 23 | /> |
| 24 | <ErrorMessage /> |
| 25 | </label> |
| 26 | ); |
| 27 | } |
| 28 |