Skip to content

Commit 2f42ac5

Browse files
committed
feat: add active prop
1 parent 3e7e8bb commit 2f42ac5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/components/billing/pricing/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ function Plans({ products, subscription }: PricingProps) {
9191

9292
return (
9393
<PricingCard
94+
active={subscription?.priceId === price.id}
9495
key={product.id}
9596
title={product.name}
9697
description={product.description}

src/components/billing/pricing/pricing-card.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface PricingCardProps extends Omit<ButtonProps, "children"> {
1515
price: string;
1616
interval: PricingPlanInterval;
1717
subscribed: boolean;
18+
active: boolean;
1819
}
1920

2021
const humanizedInterval: Record<PricingPlanInterval, string> = {
@@ -30,6 +31,7 @@ export function PricingCard({
3031
interval,
3132
price,
3233
subscribed,
34+
active,
3335
...rest
3436
}: PricingCardProps) {
3537
return (

0 commit comments

Comments
 (0)