Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix origami styling #1080

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/modal/v2/parts/CheckoutHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ const CheckoutHeader = ({
{isPreapproved === 'true' ? <span className="preapproved-label">{preapprovalLabel}</span> : ''}
</div>
{isQualifying === 'true' && qualifyingSubheadline !== '' ? (
<p className={`subheadline_p subheadline-${countryClassName} qualifying`}>
<p className={`subheadline_p subheadline-${countryClassName} qualifying checkout`}>
{isPreapproved === 'true'
? preapprovalSubHeadline
: qualifyingSubheadline.replace(/(\s?EUR)/g, ' €')}
</p>
) : (
<p
className={`subheadline_p subheadline-${countryClassName}`}
className={`subheadline_p subheadline-${countryClassName} checkout`}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html:
Expand Down
5 changes: 3 additions & 2 deletions src/components/modal/v2/parts/InlineLinks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { h } from 'preact';
import { useXProps } from '../lib';

// Create text with links scattered within it
const InlineLinks = ({ text }) => {
const InlineLinks = ({ text, useNewCheckoutDesign }) => {
const { onClick } = useXProps();

if (!Array.isArray(text)) {
Expand All @@ -22,7 +22,8 @@ const InlineLinks = ({ text }) => {
// Fallback can be removed after all translations added to the content
aria-label={linkLabel ?? `${linkText}, opens new tab.`}
target="__blank"
className="inline-link"
// className="inline-link"
className={`inline-link ${useNewCheckoutDesign === 'true' ? 'checkout' : ''}`}
href={linkUrl}
onClick={() => {
onClick({
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/v2/parts/views/LongTerm/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const LongTerm = ({
}`}
>
{typeof disclosure === 'string' || Array.isArray(disclosure) ? (
<InlineLinks text={disclosure} />
<InlineLinks text={disclosure} useNewCheckoutDesign={useNewCheckoutDesign} />
) : (
<InlineLinks
text={(disclosure?.[offerAPRDisclaimers[0].aprType] ?? '').replace(/\D00\s?(EUR|€)/g, ' €')}
Expand Down
1 change: 1 addition & 0 deletions src/components/modal/v2/styles/components/_calculator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,6 @@

&.checkout {
width: 100%;
margin-top: -6px;
}
}
1 change: 1 addition & 0 deletions src/components/modal/v2/styles/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@

.subheadline_p {
max-width: 400px;
margin-top: -1px;

@include desktop {
margin-bottom: 0px;
Expand Down
4 changes: 4 additions & 0 deletions src/components/modal/v2/styles/components/_inline-links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
font-family: $paypal-open;
font-weight: 600;

&.checkout {
font-weight: 400;
}

&::before {
content: ' ';
visibility: hidden;
Expand Down