import { productConfig } from "@product-config" import { ExplicitPricingWidget } from "../ui/PricingWidget" import { useRegional } from "../../regional" /** * Overview tab — visible in all regions. * Demonstrates useRegional() hook to read region config from the registry, * and three injection patterns side-by-side: * - Pattern 1: PricingWidget slot component (reads logic via useRegional internally) * - Pattern 3: ExplicitPricingWidget (logic injected as prop from this component) */ export function OverviewTab() { const { config, components, logic } = useRegional() const { PricingWidget } = components return (
Region:{" "} {config.locale} {" · "} Currency:{" "} {config.currency}
Sample price — Pattern 1 (slot component, logic internal):
Sample price — Pattern 3 (explicit prop, no provider needed):
Raw: {logic.formatAmount(99.99)} · Valid:{" "} {String(logic.validateAmount(99.99))}
{label}
{value}