MCPcopy Index your code
hub / github.com/adobe/react-spectrum / Example

Function Example

packages/react-aria/test/dialog/useDialog.test.js:17–21  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

15import {useDialog} from '../../src/dialog/useDialog';
16
17function Example(props) {
18 let ref = useRef();
19 let {dialogProps, titleProps} = useDialog(props, ref);
20 return (
21 <div ref={ref} {...dialogProps} data-testid="test">
22 {props.showTitle && <h2 {...titleProps}>Title</h2>}
23 {props.children}
24 </div>

Callers

nothing calls this directly

Calls 1

useDialogFunction · 0.90

Tested by

no test coverage detected