stream-chat-react
Version:
React components to create chat conversations or livestream style chat
34 lines • 1.75 kB
TypeScript
import { type PropsWithChildren } from 'react';
import { DialogManager } from '../components/Dialog/service/DialogManager';
import type { PropsWithChildrenOnly } from '../types/types';
type DialogManagerProviderContextValue = {
dialogManager: DialogManager;
};
type DialogManagerProviderProps = PropsWithChildren<{
/**
* Manager-level outside click policy.
* When `true`, clicking overlay or outside overlay-covered area closes all dialogs
* in this manager. When `false`, outside clicks do not dismiss dialogs.
*/
closeOnClickOutside?: boolean;
id?: string;
}>;
/**
* Creates/provides a dialog manager and its portal destination.
*/
export declare const DialogManagerProvider: ({ children, closeOnClickOutside, id, }: DialogManagerProviderProps) => import("react/jsx-runtime").JSX.Element | null;
export type UseDialogManagerParams = {
dialogId?: string;
dialogManagerId?: string;
};
/**
* Retrieves the nearest dialog manager or searches for the dialog manager by dialog manager id or dialog id.
* Dialog id will take precedence over dialog manager id if both are provided and dialog manager is found by dialog id.
*/
export declare const useDialogManager: ({ dialogId, dialogManagerId, }?: UseDialogManagerParams) => DialogManagerProviderContextValue;
export declare const modalDialogManagerId: "modal-dialog-manager";
export declare const ModalDialogManagerProvider: ({ children }: PropsWithChildrenOnly) => import("react/jsx-runtime").JSX.Element;
export declare const useModalDialogManager: () => DialogManager | undefined;
export declare const useNearestDialogManagerContext: () => DialogManagerProviderContextValue | undefined;
export {};
//# sourceMappingURL=DialogManagerContext.d.ts.map