Skip to content

Commit 087bc61

Browse files
hasparusn1ru4l
andauthored
align columns in the pricing table (#6891)
Co-authored-by: Laurin Quast <[email protected]>
1 parent 27b8731 commit 087bc61

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

packages/web/docs/src/components/pricing/plans-table.tsx

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,24 @@ export function PlansTable({ className }: { className?: string }) {
8989
aria-hidden
9090
className="bg-beige-100 [[data-sticky]>&]:border-beige-200 relative flex items-center rounded-3xl border border-transparent *:text-left max-md:hidden md:*:w-1/4 [[data-sticky]>&]:rounded-t-none [[data-sticky]>&]:shadow-sm"
9191
>
92-
<div className="z-10 rounded-l-3xl p-6 text-xl/6 font-normal">Features</div>
93-
{pricingTiers.map(tier => (
94-
<div className="py-6 last:rounded-r-3xl" key={tier.name}>
95-
<div className="border-beige-400 flex items-center justify-between gap-4 border-l px-6 sm:[@media(width<1400px)]:[&>a]:hidden">
96-
<div className="text-xl/6 font-medium">{tier.name}</div>
92+
<div className="z-10 flex rounded-l-3xl p-6 pr-[0.5px] text-xl/6 font-normal lg:w-[28%]">
93+
<span className="border-beige-400 w-full border-r">Features</span>
94+
</div>
95+
{pricingTiers.map((tier, i) => (
96+
<div
97+
className="py-6 last:rounded-r-3xl last:pr-6 lg:w-[23%] lg:last:w-[26%]"
98+
key={tier.name}
99+
>
100+
<div
101+
className={cn(
102+
'border-beige-400 flex w-full items-center justify-between px-6 pr-0 sm:[@media(width<1400px)]:[&>a]:hidden',
103+
)}
104+
>
105+
<div className="mr-auto text-xl/6 font-medium">{tier.name}</div>
97106
{tier.cta}
107+
{i < pricingTiers.length - 1 && (
108+
<div className="border-beige-400 h-full w-6 select-none border-r">&nbsp;</div>
109+
)}
98110
</div>
99111
</div>
100112
))}
@@ -117,7 +129,7 @@ export function PlansTable({ className }: { className?: string }) {
117129
/>
118130

119131
<tr>
120-
<PlansTableCell className="whitespace-pre">Maximum team size</PlansTableCell>
132+
<PlansTableCell>Maximum team size</PlansTableCell>
121133
<PlansTableCell activePlan={activePlan} plan="Hobby">
122134
Unlimited
123135
</PlansTableCell>
@@ -130,7 +142,7 @@ export function PlansTable({ className }: { className?: string }) {
130142
</tr>
131143

132144
<tr>
133-
<PlansTableCell className="whitespace-pre">
145+
<PlansTableCell>
134146
<TextLink href="/docs/management/sso-oidc-provider" target="_blank">
135147
Single Sign-On (SSO)
136148
</TextLink>
@@ -147,7 +159,7 @@ export function PlansTable({ className }: { className?: string }) {
147159
</tr>
148160

149161
<tr>
150-
<PlansTableCell className="whitespace-pre">
162+
<PlansTableCell>
151163
<TextLink href="/docs/management/members-roles-permissions" target="_blank">
152164
Role-based Access Control (RBAC)
153165
</TextLink>
@@ -164,7 +176,7 @@ export function PlansTable({ className }: { className?: string }) {
164176
</tr>
165177

166178
<tr>
167-
<PlansTableCell className="whitespace-pre">
179+
<PlansTableCell>
168180
<TextLink href="/docs/graphql-api" target="_blank">
169181
GraphQL Management API
170182
</TextLink>
@@ -274,7 +286,7 @@ export function PlansTable({ className }: { className?: string }) {
274286
/>
275287

276288
<tr>
277-
<PlansTableCell className="whitespace-pre">
289+
<PlansTableCell>
278290
<TextLink href=" /docs/schema-registry/usage-reporting" target="_blank">
279291
Operation usage reporting and insights
280292
</TextLink>
@@ -291,7 +303,7 @@ export function PlansTable({ className }: { className?: string }) {
291303
</tr>
292304

293305
<tr>
294-
<PlansTableCell className="whitespace-pre">Usage reporting per month</PlansTableCell>
306+
<PlansTableCell>Usage reporting per month</PlansTableCell>
295307
<PlansTableCell activePlan={activePlan} plan="Hobby">
296308
1M operations per month
297309
</PlansTableCell>
@@ -909,7 +921,7 @@ function PlansTableCell({
909921
<td
910922
aria-hidden={plan !== currentPlan}
911923
className={cn(
912-
'border-beige-400 border-b border-r p-4 font-medium first:border-l first:font-medium max-md:w-1/2 max-sm:text-sm sm:py-6 md:w-1/4 [&:not(:first-child)]:border-l-0 [&:not(:first-child)]:text-center [&:not(:first-child)]:text-sm [&:not(:first-child)]:text-green-800 md:[.subheader+tr>&:last-child]:rounded-tr-3xl max-md:[.subheader+tr>&:not(:first-child,:has(+td[aria-hidden=false]))]:rounded-tr-3xl [.subheader+tr>&]:border-t [.subheader+tr>&]:first:rounded-tl-3xl md:[tr:is(:has(+.subheader),:last-child)>&:last-child]:rounded-br-3xl max-md:[tr:is(:has(+.subheader),:last-child)>&:not(:first-child,:has(+td[aria-hidden=false]))]:rounded-br-3xl [tr:is(:last-child,:has(+.subheader))>&]:first:rounded-bl-3xl',
924+
'border-beige-400 border-b border-r p-4 font-medium first:border-l first:font-medium max-md:w-1/2 max-sm:text-sm sm:py-6 md:w-1/4 lg:w-[23%] lg:first:w-[28%] lg:last:w-[26%] [&:not(:first-child)]:border-l-0 [&:not(:first-child)]:text-center [&:not(:first-child)]:text-sm [&:not(:first-child)]:text-green-800 md:[.subheader+tr>&:last-child]:rounded-tr-3xl max-md:[.subheader+tr>&:not(:first-child,:has(+td[aria-hidden=false]))]:rounded-tr-3xl [.subheader+tr>&]:border-t [.subheader+tr>&]:first:rounded-tl-3xl md:[tr:is(:has(+.subheader),:last-child)>&:last-child]:rounded-br-3xl max-md:[tr:is(:has(+.subheader),:last-child)>&:not(:first-child,:has(+td[aria-hidden=false]))]:rounded-br-3xl [tr:is(:last-child,:has(+.subheader))>&]:first:rounded-bl-3xl',
913925
plan && plan !== currentPlan && 'max-md:hidden',
914926
className,
915927
)}

0 commit comments

Comments
 (0)