stream-chat-react
Version:
React components to create chat conversations or livestream style chat
29 lines (28 loc) • 1.22 kB
TypeScript
import React, { type PropsWithChildren } from 'react';
import { DialogManager } from '../components/Dialog/DialogManager';
import type { PropsWithChildrenOnly } from '../types/types';
type DialogManagerProviderContextValue = {
dialogManager: DialogManager;
};
/**
* Marks the portal location
* @param children
* @param id
* @constructor
*/
export declare const DialogManagerProvider: ({ children, id, }: PropsWithChildren<{
id?: string;
}>) => React.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) => React.JSX.Element;
export declare const useModalDialogManager: () => DialogManager | undefined;
export {};