Files
klz-cables.com/scripts/pdf/react-pdf/components/Section.tsx
Marc Mintel e4eabd7a86
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 17m33s
sheets
2026-01-30 22:10:01 +01:00

21 lines
543 B
TypeScript

import * as React from 'react';
import { Text, View } from '@react-pdf/renderer';
import { styles } from '../styles';
export function Section(props: {
title: string;
children: React.ReactNode;
boxed?: boolean;
minPresenceAhead?: number;
}): React.ReactElement {
const boxed = props.boxed ?? true;
return (
<View style={styles.section} minPresenceAhead={props.minPresenceAhead}>
<Text style={styles.sectionTitle}>{props.title}</Text>
<View style={styles.sectionAccent} />
{props.children}
</View>
);
}