// @flow import * as React from 'react'; import { User, Document, Collection } from '../models'; import EmailTemplate from './components/EmailLayout'; import Body from './components/Body'; import Button from './components/Button'; import Heading from './components/Heading'; import Header from './components/Header'; import Footer from './components/Footer'; import EmptySpace from './components/EmptySpace'; export type Props = { actor: User, document: Document, collection: Collection, eventName: string, unsubscribeUrl: string, }; export const documentNotificationEmailText = ({ actor, document, collection, eventName = 'published', }: Props) => ` "${document.title}" ${eventName} ${actor.name} ${eventName} the document "${document.title}", in the ${ collection.name } collection. Open Document: ${process.env.URL}${document.url} `; export const DocumentNotificationEmail = ({ actor, document, collection, eventName = 'published', unsubscribeUrl, }: Props) => { return (
"{document.title}" {eventName}

{actor.name} {eventName} the document "{document.title}", in the{' '} {collection.name} collection.


{document.getSummary()}