@@ -10,6 +10,7 @@ import type { AppLocale } from "@/lib/i18n"
1010import { cn } from "@/lib/utils"
1111import NumberFlow from "@number-flow/react"
1212import { IconCheck , IconX } from "@tabler/icons-react"
13+ import { BorderBeam } from "border-beam"
1314import { useState } from "react"
1415
1516type PricingPeriod = "monthly" | "quarterly" | "yearly"
@@ -32,9 +33,9 @@ export function PricingSection({ content, locale, packages, paymentPeriod }: Pri
3233 { value : "yearly" , label : paymentPeriod . yearlyText } ,
3334 ] as const
3435 const periodSuffix = {
35- monthly : paymentPeriod . monthlyPeriodSuffix ,
36- quarterly : paymentPeriod . quarterlyPeriodSuffix ,
37- yearly : paymentPeriod . yearlyPeriodSuffix ,
36+ monthly : "/mo" ,
37+ quarterly : "/qtr" ,
38+ yearly : "/yr" ,
3839 } [ selectedPeriod ]
3940 const pricingPackages = [
4041 {
@@ -96,18 +97,14 @@ export function PricingSection({ content, locale, packages, paymentPeriod }: Pri
9697 ? Math . max ( 0 , Math . round ( ( 1 - pricingPackage . price / ( pricingPackage . monthlyPrice * periodMonths ) ) * 100 ) )
9798 : 0
9899
99- return (
100+ const card = (
100101 < StaggerItem
101102 key = { pricingPackage . key }
102103 y = { 14 }
103104 duration = { 0.42 }
104- className = { cn (
105- "relative flex h-full min-w-0 flex-col overflow-hidden rounded-3xl border border-white/5 bg-[linear-gradient(160deg,rgba(255,255,255,0.08),rgba(255,255,255,0.02)_28%,rgba(8,10,20,0.6)_100%)] p-6 md:p-8" ,
106- highlighted &&
107- "z-10 border-brand/40 bg-[linear-gradient(160deg,rgba(145,232,120,0.14),rgba(255,255,255,0.04)_32%,rgba(8,10,20,0.72)_100%)] transition-[scale] duration-300 md:scale-[1.025] lg:scale-[1.05]"
108- ) }
105+ className = "relative flex h-full min-w-0 flex-col overflow-hidden rounded-3xl border border-white/5 bg-[linear-gradient(160deg,rgba(255,255,255,0.08),rgba(255,255,255,0.02)_28%,rgba(8,10,20,0.6)_100%)] p-6 md:p-8"
109106 >
110- < div className = { cn ( "pointer-events-none absolute inset-x-0 top-0 h-px bg-linear-to-r from-transparent via-white/30 to-transparent" , highlighted && "via-brand" ) } />
107+ < div className = "pointer-events-none absolute inset-x-0 top-0 h-px bg-linear-to-r from-transparent via-white/30 to-transparent" />
111108 { discount > 0 && (
112109 < StableBadge
113110 border
@@ -117,24 +114,24 @@ export function PricingSection({ content, locale, packages, paymentPeriod }: Pri
117114 </ StableBadge >
118115 ) }
119116 < h3 className = { cn ( "relative z-10 text-2xl font-semibold text-white" , discount > 0 && "pr-20" ) } > { pricingPackage . title } </ h3 >
120- { pricingPackage . description && < p className = "relative z-10 mt-3 leading-6 text-secondary" > { pricingPackage . description } </ p > }
121117
122118 { pricingPackage . price !== null && (
123- < div className = "relative z-10 mt-6 " >
119+ < div className = "relative z-10 mt-2 " >
124120 < div className = "flex flex-wrap items-center gap-2" >
125121 < NumberFlow
126122 value = { pricingPackage . price }
127123 locales = { locale === "de" ? "de-DE" : "en-US" }
128124 format = { { style : "currency" , currency : "EUR" , trailingZeroDisplay : "stripIfInteger" } }
129125 className = "text-4xl font-semibold text-white"
130126 />
127+ < span className = "text-lg font-semibold text-tertiary" > { periodSuffix } </ span >
131128 </ div >
132- { periodSuffix && < p className = "mt-1 text-sm text-tertiary" > { periodSuffix } </ p > }
133129 </ div >
134130 ) }
131+ { pricingPackage . description && < p className = "relative z-10 leading-6 text-secondary" > { pricingPackage . description } </ p > }
135132
136133 { ( features . length > 0 || missingFeatures . length > 0 ) && (
137- < ul className = "relative z-10 mt-8 flex flex-col gap-3 " >
134+ < ul className = "relative z-10 mt-8 flex flex-col gap-2 " >
138135 { features . map ( ( feature , featureIndex ) => (
139136 < li key = { feature . id ?? `feature-${ featureIndex } ` } className = "flex items-start gap-3 text-sm text-white" >
140137 < IconCheck size = { 18 } className = "mt-0.5 shrink-0 text-brand" />
@@ -163,6 +160,14 @@ export function PricingSection({ content, locale, packages, paymentPeriod }: Pri
163160 ) }
164161 </ StaggerItem >
165162 )
163+
164+ return highlighted ? (
165+ < BorderBeam key = { pricingPackage . key } size = "pulse-inner" colorVariant = "colorful" strength = { 0.7 } className = "h-full" >
166+ { card }
167+ </ BorderBeam >
168+ ) : (
169+ card
170+ )
166171 } ) }
167172 </ StaggerContainer >
168173 </ Section >
0 commit comments