import { Button, Heading, Row, Section, Text } from "@react-email/components";
import type { ReactNode } from "react";
import Base from "./base";
export type Generic_NewMail = {
mailType: "generic";
props: GenericProps;
};
type Corpo = {
testo?: undefined;
corpo: ReactNode;
};
type Testo = {
testo: string;
corpo?: undefined;
};
type GenericProps = {
title: string;
noreply?: boolean;
link?: {
href: string;
label?: string;
};
} & (Corpo | Testo);
const Generic = ({
title,
noreply = false,
testo,
corpo,
link = undefined,
}: GenericProps) => {
return (
<>
{title}
{corpo ? (
corpo
) : (
{testo}
)}
{link && (
)}
>
);
};
export default Generic;