diff --git a/client/signup/steps/page-picker/index.tsx b/client/signup/steps/page-picker/index.tsx index 644be41bbed8..78ed836a3ec1 100644 --- a/client/signup/steps/page-picker/index.tsx +++ b/client/signup/steps/page-picker/index.tsx @@ -3,6 +3,7 @@ import { getDIFMTieredPriceDetails, WPCOM_DIFM_LITE } from '@automattic/calypso- import { RazorpayHookProvider } from '@automattic/calypso-razorpay'; import { StripeHookProvider } from '@automattic/calypso-stripe'; import { Button } from '@automattic/components'; +import { BraveTick } from '@automattic/components/src/icons'; import { formatCurrency } from '@automattic/number-formatters'; import { createRequestCartProduct } from '@automattic/shopping-cart'; import { isMobile } from '@automattic/viewport'; @@ -361,7 +362,12 @@ interface StepProps { const StyledButton = styled( Button )` &.button.is-primary { + min-width: 230px; padding: 10px 27px 10px 28px; + + @media ( max-width: 600px ) { + min-width: auto; + } } `; @@ -374,6 +380,24 @@ const Placeholder = styled.span` min-width: 32px; `; +const RefundText = styled.div` + display: flex; + align-items: center; + width: 100%; + margin-top: 24px; + + @media ( max-width: 600px ) { + font-size: smaller; + } +`; + +const StyledBraveTickIcon = styled( BraveTick )` + margin-inline-end: 6px; + path { + fill: var( --color-accent ); + } +`; + function OneClickPurchaseModal( { onClose, siteSlug, @@ -579,6 +603,17 @@ function DIFMPagePicker( props: StepProps ) { } ); + const renderRefundText = () => { + return ( + + + { translate( '%(days)d-day money-back guarantee', { + args: { days: 14 }, + } ) } + + ); + }; + return ( - { translate( 'Go to Checkout' ) } - + <> + + { translate( 'Go to Checkout' ) } + + + { renderRefundText() } + } headerContent={ + > + { renderRefundText() } + } { ...props } /> diff --git a/client/signup/steps/page-picker/shopping-cart-for-difm.tsx b/client/signup/steps/page-picker/shopping-cart-for-difm.tsx index ac96a075189e..64ba4e9c98f8 100644 --- a/client/signup/steps/page-picker/shopping-cart-for-difm.tsx +++ b/client/signup/steps/page-picker/shopping-cart-for-difm.tsx @@ -1,10 +1,10 @@ -import { BraveTick } from '@automattic/components/src/icons'; import styled from '@emotion/styled'; import { useTranslate } from 'i18n-calypso'; import { useSelector } from 'react-redux'; import { getCurrentUserCurrencyCode } from 'calypso/state/currency-code/selectors'; import LoadingLine from './loading-content'; import useCartForDIFM, { CartItem } from './use-cart-for-difm'; +import type { ReactNode } from 'react'; const CartContainer = styled.div` position: relative; @@ -20,7 +20,6 @@ const CartContainer = styled.div` align-items: center; justify-content: center; } - margin-bottom: 48px; `; const LoadingContainer = styled.div` @@ -47,14 +46,6 @@ const Cart = styled.div` width: 100%; border-top: 1px solid var( --studio-gray-5 ); } - .page-picker__disclaimer { - color: var( --studio-gray-50 ); - font-size: 12px; - - @media ( max-width: 600px ) { - padding: 5px 0; - } - } `; const DummyLineItemContainer = styled.div` display: flex; @@ -110,7 +101,6 @@ const LineItemsWrapper = styled.div` max-height: 75vh; width: 100%; max-width: 365px; - border-bottom: 1px solid var( --studio-gray-5 ); @media ( max-width: 600px ) { margin: 0 0px; border: none; @@ -123,16 +113,15 @@ const Total = styled.div` display: flex; flex-wrap: wrap; justify-content: space-between; - padding: 30px 0; + padding: 16px 0; div { display: flex; - align-items: center; &.page-picker__value { font-family: Recoleta; font-size: 32px; font-weight: 400; @media ( max-width: 600px ) { - font-size: 16px; + font-size: 20px; } } } @@ -141,25 +130,6 @@ const Total = styled.div` font-size: 16px; margin-top: 6px; padding: 5px 0px; - border-bottom: 1px solid var( --studio-gray-5 ); - } -`; - -const StyledBraveTickIcon = styled( BraveTick )` - margin-inline-end: 6px; - path { - fill: var( --color-accent ); - } -`; - -const RefundText = styled.div` - display: flex; - width: 100%; - justify-content: flex-end; - margin-top: 8px; - - @media ( max-width: 600px ) { - font-size: smaller; } `; @@ -184,10 +154,12 @@ export default function ShoppingCartForDIFM( { selectedPages, isStoreFlow, currentPlanSlug, + children, }: { selectedPages: string[]; isStoreFlow: boolean; currentPlanSlug?: string | null; + children?: ReactNode; } ) { const translate = useTranslate(); const { items, total, isProductsLoading } = useCartForDIFM( { @@ -212,19 +184,12 @@ export default function ShoppingCartForDIFM( { ) ) } -
{ translate( 'Total' ) }
-
{ total }*
- - - { translate( '%(days)d-day money-back guarantee', { - args: { days: 14 }, - } ) } - +
{ translate( 'Subtotal' ) }
+
{ total }
-
- { translate( '*Final price will be calculated at checkout.' ) } -
+ + { children } ); diff --git a/client/signup/steps/page-picker/style.scss b/client/signup/steps/page-picker/style.scss index a17fdd488a25..84c748cdf771 100644 --- a/client/signup/steps/page-picker/style.scss +++ b/client/signup/steps/page-picker/style.scss @@ -25,7 +25,27 @@ } .step-wrapper__header-button { - margin-top: 34px; + margin-top: 10px; + + @media (max-width: $break-small) { + margin-top: 34px; + } + + .refund-text { + @media (max-width: $break-small) { + display: none; + } + } + } + + .step-wrapper__header-content { + .refund-text { + margin: 5px 0; + + @media (min-width: $break-small) { + display: none; + } + } } } }