fix(pdf): remove unsupported text borders and gap causing layout crash
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 1m26s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 1m26s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
This commit is contained in:
@@ -52,7 +52,8 @@ const styles = StyleSheet.create({
|
|||||||
|
|
||||||
logo: {
|
logo: {
|
||||||
width: 60,
|
width: 60,
|
||||||
height: 'auto',
|
height: 30,
|
||||||
|
objectFit: 'contain',
|
||||||
},
|
},
|
||||||
|
|
||||||
docType: {
|
docType: {
|
||||||
@@ -103,10 +104,13 @@ const styles = StyleSheet.create({
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
color: C.navyDeep,
|
color: C.navyDeep,
|
||||||
marginTop: 24,
|
|
||||||
marginBottom: 12,
|
|
||||||
textTransform: 'uppercase',
|
textTransform: 'uppercase',
|
||||||
letterSpacing: 0.8,
|
letterSpacing: 0.8,
|
||||||
|
},
|
||||||
|
|
||||||
|
heading1Wrapper: {
|
||||||
|
marginTop: 24,
|
||||||
|
marginBottom: 12,
|
||||||
borderLeftWidth: 3,
|
borderLeftWidth: 3,
|
||||||
borderLeftColor: C.accent,
|
borderLeftColor: C.accent,
|
||||||
paddingLeft: 12,
|
paddingLeft: 12,
|
||||||
@@ -186,7 +190,6 @@ const styles = StyleSheet.create({
|
|||||||
|
|
||||||
footerInfo: {
|
footerInfo: {
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: 2,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
footerBrand: {
|
footerBrand: {
|
||||||
@@ -195,7 +198,7 @@ const styles = StyleSheet.create({
|
|||||||
color: C.navyDeep,
|
color: C.navyDeep,
|
||||||
textTransform: 'uppercase',
|
textTransform: 'uppercase',
|
||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
marginBottom: 2,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
|
|
||||||
footerText: {
|
footerText: {
|
||||||
@@ -244,14 +247,28 @@ const renderLexicalNode = (node: any, idx: number): React.ReactNode => {
|
|||||||
|
|
||||||
case 'heading': {
|
case 'heading': {
|
||||||
let hStyle = styles.heading3;
|
let hStyle = styles.heading3;
|
||||||
if (node.tag === 'h1') hStyle = styles.heading1;
|
let isH1 = false;
|
||||||
|
if (node.tag === 'h1') {
|
||||||
|
hStyle = styles.heading1;
|
||||||
|
isH1 = true;
|
||||||
|
}
|
||||||
if (node.tag === 'h2') hStyle = styles.heading2;
|
if (node.tag === 'h2') hStyle = styles.heading2;
|
||||||
|
|
||||||
return (
|
const content = (
|
||||||
<Text key={idx} style={hStyle}>
|
<Text key={idx} style={hStyle}>
|
||||||
{node.children?.map((child: any, i: number) => renderLexicalNode(child, i))}
|
{node.children?.map((child: any, i: number) => renderLexicalNode(child, i))}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (isH1) {
|
||||||
|
return (
|
||||||
|
<View key={idx} style={styles.heading1Wrapper}>
|
||||||
|
{content}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'list': {
|
case 'list': {
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"preinstall": "npx only-allow pnpm"
|
"preinstall": "npx only-allow pnpm"
|
||||||
},
|
},
|
||||||
"version": "2.3.18-rc.3",
|
"version": "2.3.18-rc.4",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@parcel/watcher",
|
"@parcel/watcher",
|
||||||
|
|||||||
Reference in New Issue
Block a user