(props)
| 30 | import {usePress} from '../../src/interactions/usePress'; |
| 31 | |
| 32 | function Example(props) { |
| 33 | let {elementType: ElementType = 'div', style, draggable, ...otherProps} = props; |
| 34 | let {pressProps} = usePress(otherProps); |
| 35 | return ( |
| 36 | <ElementType {...pressProps} style={style} tabIndex="0" draggable={draggable} id="testElement"> |
| 37 | {ElementType !== 'input' ? props.children || 'test' : undefined} |
| 38 | </ElementType> |
| 39 | ); |
| 40 | } |
| 41 | |
| 42 | function pointerEvent(type, opts) { |
| 43 | let evt = new Event(type, {bubbles: true, cancelable: true, composed: true}); |
nothing calls this directly
no test coverage detected