From e668da200d3bdb37638e98fb495d4b32b1c36230 Mon Sep 17 00:00:00 2001 From: v4ltages Date: Mon, 3 Aug 2026 20:59:32 +0300 Subject: [PATCH] Fix styling for ticket switcher --- src/app/[locale]/piletid/page.tsx | 2 +- src/components/SwitchableTicketCard.tsx | 284 +++++++++++++++--------- 2 files changed, 183 insertions(+), 103 deletions(-) diff --git a/src/app/[locale]/piletid/page.tsx b/src/app/[locale]/piletid/page.tsx index 6c7633e..7147178 100644 --- a/src/app/[locale]/piletid/page.tsx +++ b/src/app/[locale]/piletid/page.tsx @@ -78,7 +78,7 @@ function TicketCard({ key={index} className="flex items-start gap-2 text-[#EEE5E5] text-base" > - + {feature} ))} diff --git a/src/components/SwitchableTicketCard.tsx b/src/components/SwitchableTicketCard.tsx index 257f52c..58c48b4 100644 --- a/src/components/SwitchableTicketCard.tsx +++ b/src/components/SwitchableTicketCard.tsx @@ -72,9 +72,25 @@ export default function SwitchableTicketCard({ ); } + function renderMobileFeatures(features: string[]) { + return ( +
    + {features.map((feature, index) => ( +
  • + + {feature} +
  • + ))} +
+ ); + } + return (
{backgroundImage && ( - {/* Title + subtitle + price with position shift */} -
-
-
+ {/* Mobile: Simple slide transition at sm: breakpoint (640px) */} +
+
-

- {optionA.title} -

-

- {optionA.subtitle} -

-

- {renderPrice(optionA.price)} -

+
+

+ {optionA.title} +

+

+ {optionA.subtitle} +

+

+ {renderPrice(optionA.price)} +

+ {renderMobileFeatures(optionA.features)} +
-

- {optionB.title} -

-

- {optionB.subtitle} -

-

- {renderPrice(optionB.price)} -

+
+

+ {optionB.title} +

+

+ {optionB.subtitle} +

+

+ {renderPrice(optionB.price)} +

+ {renderMobileFeatures(optionB.features)} +
-
-
- -
-
-
-
-
- {renderFeatures(optionA.features)} -
-
-
-
- -
-
-
-
- {renderFeatures(optionB.features)} -
-
-
+
+ + +
- - - + {/* Desktop: Original transition behavior */} +
+ {/* Title + subtitle + price with position shift */} +
+
+
+
+

+ {optionA.title} +

+

+ {optionA.subtitle} +

+

+ {renderPrice(optionA.price)} +

+
+
+

+ {optionB.title} +

+

+ {optionB.subtitle} +

+

+ {renderPrice(optionB.price)} +

+
+
+
+
+ +
+
+
+
+
+ {renderFeatures(optionA.features)} +
+
+
+
+ +
+
+
+
+ {renderFeatures(optionB.features)} +
+
+
+
+
+ + + + +
- {/* Chevron buttons on left/right sides — hidden on mobile */} + {/* Chevron buttons on left/right sides */} -
+