mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Align action dialog styling with dashboard UI patterns.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3d3b6ab18f
commit
b5347f32a8
@ -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 (
|
||||
<DesignDialog
|
||||
|
||||
Loading…
Reference in New Issue
Block a user