From b5347f32a8e160da2d36f6fe6038b441c7e153f6 Mon Sep 17 00:00:00 2001 From: Developing-Gamer Date: Wed, 27 May 2026 13:35:38 -0700 Subject: [PATCH] Align action dialog styling with dashboard UI patterns. Co-authored-by: Cursor --- apps/dashboard/src/components/ui/action-dialog.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/src/components/ui/action-dialog.tsx b/apps/dashboard/src/components/ui/action-dialog.tsx index b74eed732..683cf8ec4 100644 --- a/apps/dashboard/src/components/ui/action-dialog.tsx +++ b/apps/dashboard/src/components/ui/action-dialog.tsx @@ -2,6 +2,7 @@ import type { Icon as PhosphorIcon } from "@phosphor-icons/react"; import { InfoIcon, WarningCircleIcon } from "@phosphor-icons/react"; +import { throwErr } from "@stackframe/stack-shared/dist/utils/errors"; import { DesignButton, DesignDialog, @@ -77,9 +78,11 @@ export function ActionDialog(props: ActionDialogProps) { props.onOpenChange?.(nextOpen); }; - const trigger = props.trigger != null && React.isValidElement(props.trigger) - ? props.trigger - : undefined; + const trigger = props.trigger == null + ? undefined + : React.isValidElement(props.trigger) + ? props.trigger + : throwErr("ActionDialog trigger must be a React element because DesignDialog renders it with asChild"); return (