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

Function Example

packages/react-aria/test/overlays/useModal.test.js:36–43  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

34}
35
36function Example(props) {
37 return (
38 <OverlayProvider data-testid="root-provider">
39 This is the root provider.
40 {props.showModal && <Modal container={props.container}>{props.children}</Modal>}
41 </OverlayProvider>
42 );
43}
44
45describe('useModal', function () {
46 it('should set aria-hidden on parent providers on mount and remove on unmount', function () {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected