Files
NapCatQQ/.pnpm-store/v3/files/a8/471c54d3220b2ef179429bbeac9fe278df96a47e1190b01be3246f750cdb926f49b38dc81f48be4cba10e53b765cfd50f306393870dba81e72ddedacf0e65b
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

21 lines
1.0 KiB
Plaintext

import { AriaModalOverlayProps, ModalOverlayAria } from '@react-aria/overlays';
import { OverlayTriggerState } from '@react-stately/overlays';
import { RefObject } from 'react';
interface UseAriaModalOverlayProps extends AriaModalOverlayProps {
}
/**
* Provides the behavior and accessibility implementation for a modal component.
* A modal is an overlay element which blocks interaction with elements outside it.
*
* This is a modified version from https://vscode.dev/github/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/useModalOverlay.ts#L46
*
* This implementation disables the prevent scroll when `shouldBlockScroll` prop is false.
*/
declare function useAriaModalOverlay(props: (UseAriaModalOverlayProps & {
shouldBlockScroll?: boolean | undefined;
}) | undefined, state: OverlayTriggerState, ref: RefObject<HTMLElement>): ModalOverlayAria;
type UseAriaModalOverlayReturn = ReturnType<typeof useAriaModalOverlay>;
export { UseAriaModalOverlayProps, UseAriaModalOverlayReturn, useAriaModalOverlay };