fix(pdf): fix logo color override on front side
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Successful in 1m19s
Build & Deploy / 🏗️ Build (push) Successful in 2m42s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m22s
Build & Deploy / 🔔 Notify (push) Successful in 4s
Nightly QA / 💨 Smoke & Health (push) Successful in 2m6s

This commit is contained in:
2026-06-12 16:08:18 +02:00
parent b826b5b741
commit 80f5e46d88
13 changed files with 8 additions and 1 deletions

View File

@@ -455,6 +455,7 @@ const VectorLogo = ({
style, style,
overrideColor, overrideColor,
overrideWhiteColor, overrideWhiteColor,
overrideBlackColor,
pathOverrides, pathOverrides,
solidPaths, solidPaths,
solidBackgroundColor = '#000a66', solidBackgroundColor = '#000a66',
@@ -463,6 +464,7 @@ const VectorLogo = ({
style: any; style: any;
overrideColor?: string; overrideColor?: string;
overrideWhiteColor?: string; overrideWhiteColor?: string;
overrideBlackColor?: string;
pathOverrides?: Record<number, string>; pathOverrides?: Record<number, string>;
solidPaths?: number[]; solidPaths?: number[];
solidBackgroundColor?: string; solidBackgroundColor?: string;
@@ -492,6 +494,11 @@ const VectorLogo = ({
(p.fill === 'white' || p.fill === '#ffffff' || p.fill === '#fff') (p.fill === 'white' || p.fill === '#ffffff' || p.fill === '#fff')
) { ) {
fill = overrideWhiteColor; fill = overrideWhiteColor;
} else if (
overrideBlackColor &&
(p.fill === 'black' || p.fill === '#000000' || p.fill === '#0a0a0a' || p.fill === '#000')
) {
fill = overrideBlackColor;
} }
return <Path key={i} d={d} fill={fill} />; return <Path key={i} d={d} fill={fill} />;
})} })}
@@ -916,7 +923,7 @@ export const PDFBusinessCard: React.FC<PDFBusinessCardProps> = ({
<VectorLogo <VectorLogo
paths={getBackLogoPaths()} paths={getBackLogoPaths()}
style={styles.backLogo} style={styles.backLogo}
overrideWhiteColor={COLORS.primary} overrideBlackColor={COLORS.primary}
pathOverrides={{ pathOverrides={{
...(KLZ_PATHS.reduce( ...(KLZ_PATHS.reduce(
(acc: Record<number, string>, idx) => ({ ...acc, [idx]: 'none' }), (acc: Record<number, string>, idx) => ({ ...acc, [idx]: 'none' }),