Files
klz-cables.com/scripts/pdf/react-pdf/components/Section.tsx
Marc Mintel 20051244d9
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
feat: unify pdf datasheet architecture and regenerate all products
2026-03-06 23:42:46 +01:00

23 lines
546 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={boxed ? styles.section : styles.sectionPlain}
minPresenceAhead={props.minPresenceAhead}
>
<Text style={styles.sectionTitle}>{props.title}</Text>
{props.children}
</View>
);
}