react-use-hook-modal
Version:
A React Hook library for declaratively managing modals, eliminating the need for state declarations. Props can be passed directly through function calls, simplifying modal control in your application.
13 lines (12 loc) • 332 B
TypeScript
import type { ModalKey } from '../types/modal';
interface UseModalStatusParams {
key: ModalKey;
}
/**
* Hook for monitoring modal's open/close status
* Only tracks the modal state without providing control methods
*/
export default function useModalStatus({ key }: UseModalStatusParams): {
isOpen: boolean;
};
export {};