💸 Create abstraction for handling pricing (#1215)

This commit is contained in:
Luke Vella 2024-07-21 20:42:53 +01:00 committed by GitHub
parent 299b33df62
commit a5ee4fafe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 302 additions and 68 deletions

View file

@ -37,20 +37,10 @@ export const BillingPlanDescription = ({
export const BillingPlanPrice = ({
children,
discount,
}: React.PropsWithChildren<{ discount?: React.ReactNode }>) => {
return (
<div>
{discount ? (
<>
<span className="mr-2 text-xl font-bold line-through">
{children}
</span>
<span className="text-3xl font-bold">{discount}</span>
</>
) : (
<span className="text-3xl font-bold">{children}</span>
)}
<div className="flex items-center gap-4">
<span className="text-3xl font-bold">{children}</span>
</div>
);
};