DonationReceipt.tsx
6 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
FieldLabel.tsx
23 lines
| 1 | import type {FieldLabelProps} from '@givewp/forms/propTypes'; |
| 2 | |
| 3 | /** |
| 4 | * The label for a field with the required indicator if applicable. |
| 5 | * |
| 6 | * @since 3.0.0 |
| 7 | */ |
| 8 | export default function FieldLabel({label, required}: FieldLabelProps) { |
| 9 | return ( |
| 10 | <span className="givewp-fields__label-text"> |
| 11 | {label} |
| 12 | {required && ( |
| 13 | <> |
| 14 | {' '} |
| 15 | <span className="givewp-field-required" title="Field Required"> |
| 16 | * |
| 17 | </span> |
| 18 | </> |
| 19 | )} |
| 20 | </span> |
| 21 | ); |
| 22 | } |
| 23 |