| 1 | import { Text } from '@react-email/components' |
| 2 | import { env } |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | InfoCard, |
| 7 | InfoRow, |
| 8 | text, |
| 9 | } from '../components/layout' |
| 10 | |
| 11 | const baseUrl = env |
| 12 | |
| 13 | interface ProposalChangeResolvedEmailProps { |
| 14 | orgSlug: string |
| 15 | proposalSlug: string |
| 16 | proposalTitle: string |
| 17 | recipientName: string |
| 18 | resolution: 'accepted |
| 19 | resolverName: string |
| 20 | } |
| 21 | |
| 22 | export default function ProposalChangeResolvedEmail |
| 23 | recipientName = 'Jane Smith' |
| 24 | proposalTitle = 'E-Commerce Platform Rebuild' |
| 25 | resolverName = 'John Doe' |
| 26 | resolution = 'accepted' |
| 27 | orgSlug = 'acme' |
| 28 | proposalSlug = 'ecommerce-rebuild' |
| 29 | }: ProposalChangeResolvedEmailProps) |
| 30 | const isAccepted = |
| 31 | const accentColor = |
| 32 | |
| 33 | return ( |
| 34 | <EmailLayout |
| 35 | accentColor={accentColor} |
| 36 | heading={`Change request ${resolution |
| 37 | preview={`Your change request on "${proposalTitle |
| 38 | > |
| 39 | <Text style={ |
| 40 | Hi {recipientName}, <span |
| 41 | {isAccepted ? 'accepted |
| 42 | proposal <span style={text |
| 43 | </Text> |
| 44 | <InfoCard> |
| 45 | <InfoRow label=' |
| 46 | <InfoRow label=' |
| 47 | </InfoCard> |
| 48 | <Text style={ |
| 49 | {isAccepted |
| 50 | ? 'The proposal has been updated. You may receive a new version for review.' |
| 51 | : 'The team has decided not to incorporate this change. You can view the proposal for more details.'} |
| 52 | </Text> |
| 53 | <ActionButton |
| 54 | color={accentColor} |
| 55 | href={`${baseUrl |
| 56 | > |
| 57 | View Proposal |
| 58 | </ActionButton> |
| 59 | </EmailLayout> |
| 60 | ) |
| 61 | } |