Purchase Plan Button
A button component to purchase a subscription plan.
Comes with a server action that will create a Stripe Checkout instance for the corresponding price ID.
Usage
import { PurchasePlanButton } from "@/app/_components/core/purchase-plan-button/_components/purchase-plan-button";
<PurchasePlanButton planName={PlanName.BASIC}>Purchase Plan</PurchasePlanButton>
Props
Name | Type | Default | Description |
---|---|---|---|
children | ReactNode | The content to be displayed in the button. | |
className | string | Additional classes. | |
planName | PlanName | The name of the plan to be purchased. The PlanName enum is defined in your Prisma schema |