26 lines
872 B
TypeScript
26 lines
872 B
TypeScript
import React from 'react';
|
|
export interface NotificationModalProps {
|
|
isOpen: boolean;
|
|
title?: string;
|
|
message: string;
|
|
onConfirm?: () => void;
|
|
onCancel?: () => void;
|
|
type?: 'info' | 'success' | 'warning' | 'error';
|
|
confirmButtonText?: string;
|
|
cancelButtonText?: string;
|
|
}
|
|
export declare const NotificationModal: React.FC<NotificationModalProps>;
|
|
export declare const useNotificationModal: () => {
|
|
modalState: {
|
|
isOpen: boolean;
|
|
title?: string;
|
|
message: string;
|
|
type?: "info" | "success" | "warning" | "error";
|
|
onConfirm?: () => void;
|
|
onCancel?: () => void;
|
|
};
|
|
openModal: (title: string, message: string, type?: "info" | "success" | "warning" | "error", onConfirm?: () => void, onCancel?: () => void) => () => void;
|
|
closeModal: () => void;
|
|
};
|
|
export default NotificationModal;
|