import type { ReactNode } from "react"; import { classNames } from "@calcom/lib"; import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; import { useLocale } from "@calcom/lib/hooks/useLocale"; export function UpgradeTip({ dark, title, description, background, features, buttons, isParentLoading, children, }: { dark?: boolean; title: string; description: string; /* overwrite EmptyScreen text */ background: string; features: Array<{ icon: JSX.Element; title: string; description: string }>; buttons?: JSX.Element; /**Chldren renders when the user is in a team */ children: JSX.Element; isParentLoading?: ReactNode; }) { const { t } = useLocale(); const { isLoading, hasTeamPlan } = useHasTeamPlan(); if (hasTeamPlan) return children; if (isLoading) return <>{isParentLoading}; return ( <>
{title}

{t(title)}

{t(description)}

{buttons}
{features.map((feature) => (
{feature.icon}

{feature.title}

{feature.description}

))}
); }