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

Function Test

packages/react-aria/test/tooltip/useTooltip.test.js:27–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 jest.useFakeTimers();
26
27 function Test() {
28 useInteractionModality();
29
30 const state = useTooltipTriggerState();
31 const {triggerProps, tooltipProps} = useTooltipTrigger({}, state);
32 const {tooltipProps: finalTooltipProps} = useTooltip(tooltipProps);
33
34 return (
35 <div>
36 <button type="button" {...triggerProps}>
37 Trigger
38 </button>
39 {state.isOpen && <span {...finalTooltipProps}>Tooltip</span>}
40 </div>
41 );
42 }
43
44 const {container, queryByRole} = render(<Test />);
45

Callers

nothing calls this directly

Calls 4

useInteractionModalityFunction · 0.90
useTooltipTriggerStateFunction · 0.90
useTooltipTriggerFunction · 0.90
useTooltipFunction · 0.90

Tested by

no test coverage detected