Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 2m18s
Build & Deploy / 🏗️ Build (push) Successful in 3m43s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 4m54s
Build & Deploy / 🔔 Notify (push) Successful in 1s
30 lines
896 B
TypeScript
30 lines
896 B
TypeScript
import * as React from 'react';
|
|
import { Image, Text, View } from '@react-pdf/renderer';
|
|
|
|
import { styles } from '../styles';
|
|
|
|
export function Header(props: {
|
|
title: string;
|
|
logoDataUrl?: string | null;
|
|
qrDataUrl?: string | null;
|
|
}): React.ReactElement {
|
|
return (
|
|
<View style={styles.header} fixed>
|
|
<View style={styles.headerLeft}>
|
|
{props.logoDataUrl ? (
|
|
<Image src={props.logoDataUrl} style={styles.logo} />
|
|
) : (
|
|
<View style={styles.brandFallback}>
|
|
<Text style={styles.brandFallbackKlz}>KLZ</Text>
|
|
<Text style={styles.brandFallbackCables}>Cables</Text>
|
|
</View>
|
|
)}
|
|
</View>
|
|
<View style={styles.headerRight}>
|
|
<Text style={styles.headerTitle}>{props.title}</Text>
|
|
{props.qrDataUrl ? <Image src={props.qrDataUrl} style={styles.qr} /> : null}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|