Skip to content

Commit 08d1147

Browse files
committed
polish(payments-ui): Revise mobile layout for Cancel/Stay subscribed pages
1 parent 023d828 commit 08d1147

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

  • libs/payments/ui/src/lib/client/components

libs/payments/ui/src/lib/client/components/CancelSubscription/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ export function CancelSubscription({
8989

9090
return (
9191
<section
92-
className="flex items-center justify-center min-h-[calc(100vh_-_4rem)] tablet:min-h-[calc(100vh_-_5rem)]"
92+
className="flex justify-center min-h-[calc(100vh_-_4rem)] tablet:items-center tablet:min-h-[calc(100vh_-_5rem)]"
9393
aria-labelledby="cancel-subscription-heading"
9494
>
9595
{cancelAtPeriodEnd && active ? (
96-
<Form.Root className="max-w-[480px] p-10 text-grey-600 bg-white rounded-xl border border-grey-200 shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
96+
<Form.Root className="max-w-[480px] p-10 text-grey-600 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
9797
<div className="flex flex-col items-center justify-center gap-6 text-center">
9898
<Image src={webIcon} alt={productName} height={64} width={64} />
9999
<Localized id="subscription-cancellation-dialog-title">
@@ -167,7 +167,8 @@ export function CancelSubscription({
167167
) : (
168168
<Form.Root
169169
action={cancelSubscriptionAtPeriodEnd}
170-
className="max-w-[480px] p-10 text-grey-600 bg-white rounded-xl border border-grey-200 shadow-[0_0_16px_0_rgba(0,0,0,0.08)]"
170+
className="max-w-[480px] p-10 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]
171+
"
171172
>
172173
<div className="flex flex-col items-center justify-center gap-6 text-center">
173174
<Image src={webIcon} alt={productName} height={64} width={64} />
@@ -194,6 +195,11 @@ export function CancelSubscription({
194195
cycle.
195196
</p>
196197
</Localized>
198+
<div
199+
className="border-none h-px bg-grey-100 my-6"
200+
role="separator"
201+
aria-hidden="true"
202+
></div>
197203
<Form.Label asChild className="cursor-pointer my-3">
198204
<label htmlFor="cancelAccess" className="flex items-start gap-4">
199205
<Form.Control asChild>

libs/payments/ui/src/lib/client/components/StaySubscribed/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ export function StaySubscribed({
9090

9191
return (
9292
<section
93-
className="flex items-center justify-center min-h-[calc(100vh_-_4rem)] tablet:min-h-[calc(100vh_-_5rem)]"
93+
className="flex justify-center min-h-[calc(100vh_-_4rem)] tablet:items-center tablet:min-h-[calc(100vh_-_5rem)]"
9494
aria-labelledby="stay-subscribed-heading"
9595
>
9696
{cancelAtPeriodEnd && active ? (
9797
<Form.Root
9898
action={resubscribe}
99-
className="max-w-[480px] p-10 text-grey-600 bg-white rounded-xl border border-grey-200 shadow-[0_0_16px_0_rgba(0,0,0,0.08)]"
99+
className="max-w-[480px] p-10 text-grey-600 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]"
100100
>
101101
<div className="flex flex-col items-center justify-center gap-4 text-center">
102102
<Image src={webIcon} alt={productName} height={64} width={64} />
@@ -201,7 +201,7 @@ export function StaySubscribed({
201201
</div>
202202
</Form.Root>
203203
) : (
204-
<Form.Root className="w-[480px] max-w-[480px] p-10 text-grey-600 bg-white rounded-xl border border-grey-200 shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
204+
<Form.Root className="w-[480px] max-w-[480px] p-10 text-grey-600 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
205205
<div className="flex flex-col items-center justify-center gap-4 text-center">
206206
<Image src={webIcon} alt={productName} height={64} width={64} />
207207
<Localized id="resubscribe-success-dialog-title">

0 commit comments

Comments
 (0)