@navinc/base-react-components
Version:
Nav's Pattern Library
22 lines (21 loc) • 815 B
TypeScript
import { ReactNode } from 'react';
import { InferComponentProps } from './types.js';
import { RawDialog } from './dialog.js';
type DialogProps = InferComponentProps<typeof RawDialog>;
type CreateDialogOptions = Omit<DialogProps, 'open'>;
type ProviderContext = {
createDialog: (options: CreateDialogOptions) => void;
closeDialog: () => void;
isDialogOpen: boolean;
};
/**
* @deprecated This component is deprecated and will be removed in a future release. Avoid using it in new code.
*/
export declare const DialogProvider: ({ children }: {
children?: ReactNode;
}) => import("react/jsx-runtime").JSX.Element;
/**
* @deprecated This component is deprecated and will be removed in a future release. Avoid using it in new code.
*/
export declare const useDialog: () => ProviderContext;
export {};