mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-14 06:47:00 +10:00
0a8fe05653
* 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>
12 lines
459 B
TypeScript
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: "" };
|
|
};
|