(props)
| 10 | import {useOverlayTriggerState} from 'react-stately/useOverlayTriggerState'; |
| 11 | |
| 12 | function Example(props) { |
| 13 | let ref = useRef(); |
| 14 | let state = useOverlayTriggerState(props); |
| 15 | let {modalProps, underlayProps} = useModalOverlay(props, state, ref); |
| 16 | return ( |
| 17 | <div {...mergeProps(underlayProps, props.underlayProps || {})}> |
| 18 | <div ref={ref} {...modalProps} data-testid={props['data-testid'] || 'test'}> |
| 19 | {props.children} |
| 20 | </div> |
| 21 | </div> |
| 22 | ); |
| 23 | } |
| 24 | |
| 25 | describe('useModalOverlay', function () { |
| 26 | describe.each` |
nothing calls this directly
no test coverage detected