UNPKG

@wix/design-system

Version:

@wix/design-system

12 lines 612 B
import React from 'react'; import { Draggable } from '../DragAndDrop/Draggable'; import { dataHooks } from './constants'; const TOUCH_BACKEND_OPTIONS = { delayTouchStart: 200, ignoreContextMenu: true, }; const preventContextMenu = e => e.preventDefault(); export default Component => props => (React.createElement("div", { "data-hook": props.dataHook, onContextMenu: preventContextMenu }, React.createElement(Draggable.Manager, { dataHook: dataHooks.provider, backendOptions: TOUCH_BACKEND_OPTIONS }, React.createElement(Component, { ...props })))); //# sourceMappingURL=withDNDContext.js.map