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
23 lines
546 B
TypeScript
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>
|
|
);
|
|
}
|