MCPcopy
hub / github.com/homarr-labs/homarr / ConfirmModalProps

Interface ConfirmModalProps

packages/modals/src/confirm-modal.tsx:14–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12type MaybePromise<T> = T | Promise<T>;
13
14export interface ConfirmModalProps {
15 title: string;
16 children: ReactNode;
17 onConfirm?: () => MaybePromise<void>;
18 onCancel?: () => MaybePromise<void>;
19 closeOnConfirm?: boolean;
20 closeOnCancel?: boolean;
21 cancelProps?: ButtonProps & ComponentPropsWithoutRef<"button">;
22 confirmProps?: ButtonProps & ComponentPropsWithoutRef<"button">;
23 groupProps?: GroupProps;
24
25 labels?: {
26 confirm?: stringOrTranslation;
27 cancel?: stringOrTranslation;
28 };
29}
30
31export const ConfirmModal = createModal<Omit<ConfirmModalProps, "title">>(({ actions, innerProps }) => {
32 const [loading, setLoading] = useState(false);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected