mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-04 11:41:51 +02:00
💸 Create abstraction for handling pricing (#1215)
This commit is contained in:
parent
299b33df62
commit
a5ee4fafe5
22 changed files with 302 additions and 68 deletions
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue