All files / react-app/src/components/Form old-content.tsx

75% Statements 6/8
50% Branches 2/4
50% Functions 2/4
75% Lines 6/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64                          77x                     77x                       77x 89x                         77x             330x            
import { Info } from "lucide-react";
 
import {
  ActionFormDescription,
  Alert,
  ProgressLossReminder,
  RequiredFieldDescription,
} from "@/components";
 
type FormIntroTextProps = {
  hasProgressLossReminder?: boolean;
};
 
export const FormIntroText = ({ hasProgressLossReminder = true }: FormIntroTextProps) => (
  <div>
    <RequiredFieldDescription />
    <ActionFormDescription boldReminder={hasProgressLossReminder}>
      Once you submit this form, a confirmation email is sent to you and to CMS. CMS will use this
      content to review your package, and you will not be able to edit this form. If CMS needs any
      additional information, they will follow up by email.{" "}
    </ActionFormDescription>
  </div>
);
 
export const FormIntroTextForAppK = () => (
  <div>
    <FormIntroText />
    <p className="max-w-4xl mt-4 text-gray-700 font-light">
      <span className="font-bold">
        If your Appendix K submission is for more than one waiver number, please enter one of the
        applicable waiver numbers. You do not need to create multiple submissions.
      </span>
    </p>
  </div>
);
 
export const SpaIdFormattingDesc = () => (
  <>
    <p>Must follow the format SS-YY-NNNN or SS-YY-NNNN-XXXX.</p>
    <p className="text-neutral-500">
      Reminder - CMS recommends that all SPA numbers start with the year in which the package is
      submitted.
    </p>
  </>
);
 
type PreSubmissionMessageProps = {
  hasProgressLossReminder?: boolean;
  preSubmissionMessage?: string;
};
export const PreSubmissionMessage = ({
  hasProgressLossReminder = true,
  preSubmissionMessage = `Once you submit this form, a confirmation email is sent to you and to CMS.
      CMS will use this content to review your package, and you will not be able
      to edit this form. If CMS needs any additional information, they will
      follow up by email.`,
}: PreSubmissionMessageProps) => (
  <Alert variant="infoBlock" className="my-2 flex-row text-sm">
    <Info />
    <p className="ml-2">{preSubmissionMessage}</p>
    {hasProgressLossReminder && <ProgressLossReminder className="ml-2" />}
  </Alert>
);