(props: {
open: boolean;
onOpenChange: (v: boolean) => void;
granted: number;
upgradeAction?: React.ReactNode;
})
| 499 | // Shown when the org is at its member-seat limit: a clear "you're at the limit" |
| 500 | // prompt with the plan-upgrade call to action cloud injects (a link to billing). |
| 501 | function UpgradeDialog(props: { |
| 502 | open: boolean; |
| 503 | onOpenChange: (v: boolean) => void; |
| 504 | granted: number; |
| 505 | upgradeAction?: React.ReactNode; |
| 506 | }) { |
| 507 | return ( |
| 508 | <Dialog open={props.open} onOpenChange={props.onOpenChange}> |
| 509 | {/* Informational only: nothing to lose, so clicking away dismisses it. */} |
| 510 | <DialogContent dismissOnOutsideClick className="sm:max-w-[400px]"> |
| 511 | <DialogHeader> |
| 512 | <DialogTitle className="font-display text-xl">You are at your member limit</DialogTitle> |
| 513 | <DialogDescription className="text-sm leading-relaxed"> |
| 514 | Your plan includes {props.granted} member |
| 515 | {props.granted === 1 ? "" : "s"}. Upgrade your plan to invite more. |
| 516 | </DialogDescription> |
| 517 | </DialogHeader> |
| 518 | <DialogFooter> |
| 519 | <DialogClose asChild> |
| 520 | <Button variant="ghost" size="sm"> |
| 521 | Cancel |
| 522 | </Button> |
| 523 | </DialogClose> |
| 524 | {props.upgradeAction} |
| 525 | </DialogFooter> |
| 526 | </DialogContent> |
| 527 | </Dialog> |
| 528 | ); |
| 529 | } |
| 530 | |
| 531 | function InviteDialog(props: { |
| 532 | open: boolean; |
nothing calls this directly
no outgoing calls
no test coverage detected