diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx index 71efa7ddb..1d70528ed 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx @@ -1,6 +1,12 @@ "use client"; -import { DesignEditableGrid, type DesignEditableGridItem } from "@/components/design-components"; +import { + DesignEditableGrid, + DesignButton, + DesignInput, + DesignSelectorDropdown, + type DesignEditableGridItem, +} from "@/components/design-components"; import { EditableInput } from "@/components/editable-input"; import { Link, StyledLink } from "@/components/link"; import { ItemDialog } from "@/components/payments/item-dialog"; @@ -26,9 +32,6 @@ import { DropdownMenuTrigger, Input, Label, - Popover, - PopoverContent, - PopoverTrigger, Select, SelectContent, SelectItem, @@ -647,69 +650,54 @@ function ProductDetailsSection({ productId, product, config }: ProductDetailsSec ) : 'No', }, { - type: 'custom', + type: 'custom-dropdown', itemKey: 'freeTrial', icon: , name: "Free Trial", tooltip: "Free trial period before billing starts. Customers won't be charged during this period.", - children: ( - - - + + setFreeTrialCount(parseInt(e.target.value) || 1)} + /> + setFreeTrialUnit(v as DayInterval[1])} + options={DEFAULT_INTERVAL_UNITS.map((unit) => ({ + value: unit, + label: `${unit}${freeTrialCount !== 1 ? 's' : ''}`, + }))} + /> + + + handleFreeTrialSave(freeTrialCount, freeTrialUnit)} > - {localFreeTrialDisplayText} - - - - - - setFreeTrialCount(parseInt(e.target.value) || 1)} - /> - setFreeTrialUnit(v as DayInterval[1])}> - - - - - {DEFAULT_INTERVAL_UNITS.map((unit) => ( - - {unit}{freeTrialCount !== 1 ? 's' : ''} - - ))} - - - - - handleFreeTrialSave(freeTrialCount, freeTrialUnit)} - > - Apply - - {localFreeTrial && ( - - Remove - - )} - - - - + Apply + + {localFreeTrial && ( + + Remove + + )} + + ), }, { diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx index 9e2cf81ce..909a960d2 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx @@ -614,7 +614,7 @@ function SidebarContent({