1
mirror of https://github.com/xitanggg/open-resume synced 2025-02-05 20:12:45 +01:00

Do not split companies and sections other than work experience when moving to a new page

This commit is contained in:
Anton Istomin 2023-09-07 14:52:53 +04:00
parent b5d3bc441b
commit 16fe46111b
6 changed files with 8 additions and 5 deletions

View File

@ -20,7 +20,7 @@ export const ResumePDFCustom = ({
const { descriptions } = custom;
return (
<ResumePDFSection themeColor={themeColor} heading={heading}>
<ResumePDFSection themeColor={themeColor} heading={heading} wrap={false}>
<View style={{ ...styles.flexCol }}>
<ResumePDFBulletList
items={descriptions}

View File

@ -19,7 +19,7 @@ export const ResumePDFEducation = ({
showBulletPoints: boolean;
}) => {
return (
<ResumePDFSection themeColor={themeColor} heading={heading}>
<ResumePDFSection themeColor={themeColor} heading={heading} wrap={false}>
{educations.map(
({ school, degree, date, gpa, descriptions = [] }, idx) => {
// Hide school name if it is the same as the previous school

View File

@ -17,7 +17,7 @@ export const ResumePDFProject = ({
themeColor: string;
}) => {
return (
<ResumePDFSection themeColor={themeColor} heading={heading}>
<ResumePDFSection themeColor={themeColor} heading={heading} wrap={false}>
{projects.map(({ project, date, descriptions }, idx) => (
<View key={idx}>
<View

View File

@ -27,7 +27,7 @@ export const ResumePDFSkills = ({
];
return (
<ResumePDFSection themeColor={themeColor} heading={heading}>
<ResumePDFSection themeColor={themeColor} heading={heading} wrap={false}>
{featuredSkillsWithText.length > 0 && (
<View style={{ ...styles.flexRowBetween, marginTop: spacing["0.5"] }}>
{featuredSkillsPair.map((pair, idx) => (

View File

@ -24,7 +24,7 @@ export const ResumePDFWorkExperience = ({
idx > 0 && company === workExperiences[idx - 1].company;
return (
<View key={idx} style={idx !== 0 ? { marginTop: spacing["2"] } : {}}>
<View wrap={false} key={idx} style={idx !== 0 ? { marginTop: spacing["2"] } : {}}>
{!hideCompanyName && (
<ResumePDFText bold={true}>{company}</ResumePDFText>
)}

View File

@ -9,13 +9,16 @@ export const ResumePDFSection = ({
heading,
style = {},
children,
wrap,
}: {
themeColor?: string;
heading?: string;
style?: Style;
children: React.ReactNode;
wrap?: boolean;
}) => (
<View
wrap={wrap}
style={{
...styles.flexCol,
gap: spacing["2"],