name | menu |
---|---|
Touch |
2. Feedback Containers |
import { Props, Prop, ChildrenProps, ChildrenProp } from '../_ui/PropsTable' import { Touch } from '../../dist/react-powerplug.esm'
The Touch component is used to known when user is touching some element.
import { Touch } from 'react-powerplug'
<Touch>
{({ touched, bind }) => (
<div {...bind}>
You are {touched ? 'touching' : 'not touching'} this div.
</div>
)}
</Touch>
Contains `onTouchStart` and `onTouchEnd` event listeners.