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

Function Example

packages/react-aria/test/interactions/useLongPress.test.js:19–27  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

17import {usePress} from '../../src/interactions/usePress';
18
19function Example(props) {
20 let {elementType: ElementType = 'div', ...otherProps} = props;
21 let {longPressProps} = useLongPress(otherProps);
22 return (
23 <ElementType {...longPressProps} tabIndex="0">
24 test
25 </ElementType>
26 );
27}
28
29function ExampleWithPress(props) {
30 let {elementType: ElementType = 'div', onPress, onPressStart, onPressEnd, ...otherProps} = props;

Callers

nothing calls this directly

Calls 1

useLongPressFunction · 0.90

Tested by

no test coverage detected