fix: Invoice pdf customize

This commit is contained in:
Ahmed Bouhuolia
2024-09-25 11:04:17 +02:00
parent 1c8e19378f
commit 2f9adfd908
21 changed files with 74 additions and 45 deletions

View File

@@ -9,7 +9,7 @@ export interface PaperTemplateProps {
secondaryColor?: string;
showCompanyLogo?: boolean;
companyLogo?: string;
companyLogoUri?: string;
companyName?: string;
bigtitle?: string;
@@ -21,7 +21,7 @@ export function PaperTemplate({
primaryColor,
secondaryColor,
showCompanyLogo,
companyLogo,
companyLogoUri,
bigtitle = 'Invoice',
children,
}: PaperTemplateProps) {
@@ -32,9 +32,9 @@ export function PaperTemplate({
<div>
<h1 className={styles.bigTitle}>{bigtitle}</h1>
{showCompanyLogo && (
{showCompanyLogo && companyLogoUri && (
<div className={styles.logoWrap}>
<img alt="" src={companyLogo} />
<img alt="" src={companyLogoUri} />
</div>
)}
</div>
@@ -120,8 +120,8 @@ PaperTemplate.MutedText = () => {};
PaperTemplate.Text = () => {};
PaperTemplate.AddressesGroup = (props: GroupProps) => {
return <Group spacing={10} {...props} className={styles.addressRoot} />
}
return <Group spacing={10} {...props} className={styles.addressRoot} />;
};
PaperTemplate.Address = ({
items,
}: {