import { FC } from 'react'; import classnames from 'classnames'; import { Modal, ModalProps } from '@servicetitan/design-system'; import * as Styles from './email-preview.module.less'; interface EmailPreviewProps { title: string; header?: string; body?: string; buttonText?: string; footer?: string; onClose: ModalProps['onClose']; } export const EmailPreview: FC = ({ title, header, body, buttonText, footer, onClose, }) => { const isCardEmpty = !header && !body && !buttonText; return (
{!isCardEmpty && (
{header && (

{header}

)} {body && (

{body}

)} {buttonText && ( {buttonText} )} {footer && (

{footer}

)}
)}
); };