import React, { forwardRef } from 'react' import type { FormEvent, HTMLAttributes, DetailedHTMLProps } from 'react' export interface NewsletterFormProps extends DetailedHTMLProps< Omit, 'onSubmit'>, HTMLFormElement > { /** * Function called when submit button is clicked. */ onSubmit: (event: FormEvent) => void /** * ID to find this component in testing tools (e.g.: Cypress, Testing Library, and Jest). */ testId?: string } const NewsletterForm = forwardRef( function NewsletterForm( { children, onSubmit, testId = 'fs-newsletter-form', ...otherProps }, ref ) { return (
{children}
) } ) export default NewsletterForm