All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 1m25s
Build & Deploy / 🏗️ Build (push) Successful in 2m51s
Build & Deploy / 🚀 Deploy (push) Successful in 16s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m18s
Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA / 💨 Smoke & Health (push) Successful in 1m1s
21 lines
543 B
TypeScript
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>
|
|
);
|
|
}
|