diff --git a/apps/web/config/billing.sample.config.ts b/apps/web/config/billing.sample.config.ts index 23bac72b0..b33b62ec3 100644 --- a/apps/web/config/billing.sample.config.ts +++ b/apps/web/config/billing.sample.config.ts @@ -33,7 +33,14 @@ export default createBillingSchema({ id: 'price_1NNwYHI1i3VnbZTqI2UzaHIe', name: 'Addon 2', cost: 9.99, - type: 'flat' as const, + type: 'metered' as const, + unit: 'GB', + tiers: [ + { + cost: 0.5, + upTo: 'unlimited', + }, + ], }, ], }, diff --git a/apps/web/public/locales/en/billing.json b/apps/web/public/locales/en/billing.json index 6727aea00..7cf727a41 100644 --- a/apps/web/public/locales/en/billing.json +++ b/apps/web/public/locales/en/billing.json @@ -39,6 +39,7 @@ "includedUpTo": "Up to {{upTo}} {{unit}} included in the plan", "fromPreviousTierUpTo": "for each {{unit}} for the next {{ upTo }} {{ unit }}", "andAbove": "above {{ previousTier }} {{ unit }}", + "forEveryUnit": "for every {{ unit }}", "setupFee": "plus a {{ setupFee }} setup fee", "perUnitIncluded": "({{included}} included)", "featuresLabel": "Features", diff --git a/packages/billing/gateway/src/components/line-item-details.tsx b/packages/billing/gateway/src/components/line-item-details.tsx index 0e3c2973a..26ed4c4b9 100644 --- a/packages/billing/gateway/src/components/line-item-details.tsx +++ b/packages/billing/gateway/src/components/line-item-details.tsx @@ -5,9 +5,9 @@ import { LineItemSchema } from '@kit/billing'; import { formatCurrency } from '@kit/shared/utils'; import { If } from '@kit/ui/if'; import { Trans } from '@kit/ui/trans'; +import { cn } from '@kit/ui/utils'; -const className = - 'flex text-secondary-foreground items-center justify-between text-sm'; +const className = 'flex text-secondary-foreground items-center text-sm'; export function LineItemDetails( props: React.PropsWithChildren<{ @@ -62,7 +62,7 @@ export function LineItemDetails( const FlatFee = () => (