/* * Copyright 2020-2021 AskChristee, LLC. All rights reserved. */ import { Document, Page, StyleSheet, Text, View, Image } from '@react-pdf/renderer'; import styled from '@react-pdf/styled-components'; import React, { Fragment } from 'react'; import { TClosingCostPdf, TClosingCostResponse, TResponseCoverPage } from '../../../../types/api'; import { PdfText } from '../../../atoms'; import ReportHeader from '../../../atoms/Pdf/ReportHeader'; import ReportTitle from '../../../atoms/Pdf/ReportTitle'; import UserInfo from '../../../atoms/Pdf/UserInfo'; import logo from '../../../../images/christee-logo.png'; const Description = styled.Text` text-align: left; font-size: 9px; `; const styles = StyleSheet.create({ body: { paddingTop: 10, paddingBottom: 25, paddingHorizontal: 30, }, pageNumber: { position: 'absolute', fontSize: 9, bottom: 15, left: 0, right: 0, textAlign: 'center', color: 'black', }, image: { width: 70, height: 20, }, header: { fontSize: 12, marginBottom: 20, textAlign: 'center', color: 'grey', }, textbold: { fontWeight: 900, fontSize: 9, }, description: { textAlign: 'left', width: '50%', fontSize: 9, }, description2: { textAlign: 'left', width: '100%', fontSize: 9, }, tableContainer: { flexDirection: 'row', flexWrap: 'wrap', marginTop: 10, }, row: { flexDirection: 'row', height: 16, width: '100%', }, acalc: { width: '30%', fontSize: 9, textAlign: 'left', }, logo: { width: 65, height: 15, position: 'absolute', bottom: 11, left: 65, }, copy: { fontSize: 9, position: 'absolute', bottom: 13, left: 10, }, }); const PdfReport: React.FC = ({ pdf }) => { return ( ); }; type BuyWaitPdfProps = { pdf: TClosingCostPdf; coverPage: TResponseCoverPage; }; const BuyWaitPdf: React.FC = ({ pdf, coverPage }) => { return ( {!!(coverPage.name && coverPage.email) && } Powered By `${pageNumber} / ${totalPages}`} fixed /> ); }; interface Pdf { pdf: TClosingCostPdf; } interface Props { dat: TClosingCostResponse; } const ClosingCostFinal: React.FC = ({ dat: { pdf, coverPage } }) => { console.log('ClosingCost Final pdf->', pdf); return ( ); }; export default ClosingCostFinal;