UNPKG

wix-style-react

Version:
15 lines (14 loc) 549 B
import React from 'react'; import { Draggable } from '../DragAndDrop/Draggable'; import { dataHooks } from './constants'; export default (function (Component) { var withDNDContext = function withDNDContext(props) { return /*#__PURE__*/React.createElement("div", { "data-hook": props.dataHook }, /*#__PURE__*/React.createElement(Draggable.Manager, { dataHook: dataHooks.provider }, /*#__PURE__*/React.createElement(Component, props))); }; withDNDContext.displayName = Component.displayName; return withDNDContext; });