import type { FormHTMLAttributes } from 'react' import React, { forwardRef } from 'react' import { Button, Icon, InputField } from '../..' export interface OutOfStockProps extends FormHTMLAttributes { /** * ID to find this component in testing tools (e.g.: cypress, * testing-library, and jest). */ testId?: string /** * The Out of Stock Section's title. */ title?: string /** * Additional message displayed with the title. */ subtitle?: string /** * The email input label. */ inputLabel: string /** * The button label. */ buttonLabel?: string /** * Specifies a label for loading state. */ loadingLabel?: string /** * Error message displayed when error. */ errorMessage?: string /** * Specifies that the submit button should be disabled. */ disabled: boolean /** * Event emitted when form is submitted. */ onSubmit: (event: React.FormEvent) => void } const OutOfStock = forwardRef( function OutOfStock( { testId = 'fs-out-of-stock', title, buttonLabel = 'Notify Me', loadingLabel, inputLabel, subtitle, disabled, errorMessage, onSubmit, }, ref ) { return (

{title}

{subtitle && (

{subtitle}

)} ) } ) export default OutOfStock