pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
43 lines (42 loc) • 1.25 kB
TypeScript
import 'jspdf-autotable';
import { type MRT_ColumnDef } from 'mantine-react-table';
interface ThemeColors {
primary: {
500: string;
600: string;
700: string;
};
core: {
primary: string;
secondary: string;
};
}
interface PdfExportOptions {
title?: string;
subtitle?: string;
colors?: ThemeColors;
logo?: {
url: string;
width?: number;
height?: number;
};
}
interface XlsxExportOptions {
title?: string;
subtitle?: string;
colors?: ThemeColors;
sheetName?: string;
includeTimestamp?: boolean;
autoFitColumns?: boolean;
}
interface CsvExportOptions {
title?: string;
includeTimestamp?: boolean;
includeHeaders?: boolean;
delimiter?: string;
filename?: string;
}
export declare const exportToCsv: <T extends Record<string, any>>(data: T[], columns: MRT_ColumnDef<T>[], options?: CsvExportOptions) => void;
export declare const exportToXlsx: <T extends Record<string, any>>(data: T[], columns: MRT_ColumnDef<T>[], options?: XlsxExportOptions) => void;
export declare const exportToPdf: <T extends Record<string, any>>(data: T[], columns: MRT_ColumnDef<T>[], options?: PdfExportOptions) => Promise<void>;
export {};