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
NodeWrapper.tsx
18 lines
| 1 | import type {Element} from '@givewp/forms/types'; |
| 2 | import classNames from 'classnames'; |
| 3 | import type {NodeWrapperProps} from '@givewp/forms/propTypes'; |
| 4 | |
| 5 | export default function NodeWrapper({nodeType, type, name, htmlTag: Element = 'div', children}: NodeWrapperProps) { |
| 6 | return ( |
| 7 | <Element |
| 8 | className={classNames({ |
| 9 | [`givewp-${nodeType}`]: nodeType, |
| 10 | [`givewp-${nodeType}-${type}`]: type, |
| 11 | [`givewp-${nodeType}-${type}-${name}`]: name, |
| 12 | })} |
| 13 | > |
| 14 | {children} |
| 15 | </Element> |
| 16 | ); |
| 17 | } |
| 18 |