Files
Reactive-Resume/packages/pdf/src/templates/shared/split-row.ts
T
Amruth Pillai 0a8fe05653 Fix split row right content promotion (#3039)
* Fix split row right content promotion

Co-authored-by: Amruth Pillai <im.amruth@gmail.com>

* refactor: remove MetaLine component and update sections to use Text instead

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-05-11 15:59:26 +02:00

12 lines
459 B
TypeScript

export const hasSplitRowText = (value: string | undefined): value is string => {
return typeof value === "string" && value.trim().length > 0;
};
type SplitRowContent = { top: string; bottom: string };
export const promoteSplitRowRight = ({ top, bottom }: SplitRowContent): SplitRowContent => {
if (hasSplitRowText(top)) return { top, bottom: hasSplitRowText(bottom) ? bottom : "" };
return { top: hasSplitRowText(bottom) ? bottom : "", bottom: "" };
};