MCPcopy Create free account
hub / github.com/adobe/react-spectrum / useModalProvider

Function useModalProvider

packages/react-aria/src/overlays/useModal.tsx:86–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84 * modals are open.
85 */
86export function useModalProvider(): ModalProviderAria {
87 let context = useContext(Context);
88 return {
89 modalProviderProps: {
90 'aria-hidden': context && context.modalCount > 0 ? true : undefined
91 }
92 };
93}
94
95/**
96 * Creates a root node that will be aria-hidden if there are other modals open.

Callers 2

Provider.tsxFile · 0.90
OverlayContainerDOMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected