Skip to content

Commit

Permalink
Adjusted the line height of displayed hrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
crismali committed Nov 14, 2023
1 parent 1ac7aa9 commit a9b4c4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
40 changes: 12 additions & 28 deletions src/templates/EmailTemplateSubComponents/Directive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,9 @@ export const Directive: FC<EmailSubComponentProps> = ({ emailSubComponent }) =>
</Row>

{/* Same Link As Button */}
<Row elements={['cell']}>
<div
className="link-div"
style={{
lineHeight: '150%',
wordBreak: 'break-all',
paddingBottom: '16px',
}}
>
<span style={styles.linkText} className="displayed-href">
{value.linkHref ||
'https://link.embedded-into-the-button-above.should-be-shown-here-in-order-to-give-an-alternative-way-to-access-a-link'}
</span>
</div>
<Row elements={[{ part: 'cell', style: styles.linkText, className: 'displayed-href' }]}>
{value.linkHref ||
'https://link.embedded-into-the-button-above.should-be-shown-here-in-order-to-give-an-alternative-way-to-access-a-link'}
</Row>
</Row>

Expand Down Expand Up @@ -330,20 +319,13 @@ export const Directive: FC<EmailSubComponentProps> = ({ emailSubComponent }) =>
</Row>

{/* Same Link As Button */}
<Row elements={['cell']}>
<div
className="link-div"
style={{
lineHeight: '150%',
wordBreak: 'break-all',
paddingBottom: '16px',
}}
>
<span className="displayed-href" style={styles.linkText}>
{value.linkHref ||
'https://link.embedded-into-the-button-above.should-be-shown-here-in-order-to-give-an-alternative-way-to-access-a-link'}
</span>
</div>
<Row
elements={[
{ part: 'cell', style: styles.linkText, className: 'displayed-href' },
]}
>
{value.linkHref ||
'https://link.embedded-into-the-button-above.should-be-shown-here-in-order-to-give-an-alternative-way-to-access-a-link'}
</Row>
</Row>
</Cell>
Expand Down Expand Up @@ -588,6 +570,8 @@ const styles = {
...Text.link.small,
color: Colors.alert.neutral.dark,
textAlign: 'left',
wordBreak: 'break-all',
paddingBottom: Spacing.size.medium,
} as CSSProperties,
step3AdditionalInfo: {
paddingLeft: '46px',
Expand Down
6 changes: 6 additions & 0 deletions src/templates/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,17 @@ export const Text = {
small: {
regular: defaultTextStyle({
fontSize: 10,
lineHeight: 1.25,
fontWeight: FontWeight.regular,
}),
semibold: defaultTextStyle({
fontSize: 10,
lineHeight: 1.25,
fontWeight: FontWeight.semibold,
}),
bold: defaultTextStyle({
fontSize: 10,
lineHeight: 1.25,
fontWeight: FontWeight.bold,
}),
},
Expand All @@ -284,16 +287,19 @@ export const Text = {
regular: defaultTextStyle({
fontSize: 12,
fontWeight: FontWeight.regular,
lineHeight: 1.25,
textDecoration: 'underline',
}),
bold: defaultTextStyle({
fontSize: 12,
fontWeight: FontWeight.bold,
lineHeight: 1.25,
textDecoration: 'underline',
}),
},
small: defaultTextStyle({
fontSize: 10,
lineHeight: 1.25,
textDecoration: 'underline',
}),
},
Expand Down

0 comments on commit a9b4c4a

Please sign in to comment.