'use client'; import { View, StyleSheet } from '@react-pdf/renderer'; import { PdfThead, PdfColumn } from './PdfThead'; import { PdfTbody, PdfTbodyCell } from './PdfTbody'; import { PdfTfoot, PdfTfootCell } from './PdfTfoot'; const styles = StyleSheet.create({ table: { borderWidth: 1, borderColor: '#000000', marginBottom: 15, }, }); interface PdfTableProps { columns: PdfColumn[]; data: PdfTbodyCell[][]; footer?: PdfTfootCell[]; footerLabel?: string; firstRow?: { valueKey: string; value: number; align?: 'right'; color?: string; }; } export const PdfTable = ({ columns, data, footer, footerLabel = 'Total', firstRow, }: PdfTableProps) => { return ( {footer && footer.length > 0 && ( )} ); };