UNPKG

@wix/design-system

Version:

@wix/design-system

11 lines 534 B
import React from 'react'; import { Draggable } from '../DragAndDrop/Draggable'; import { dataHooks } from './constants'; export const withDNDContext = Component => { const WithDNDContext = props => (React.createElement("div", { "data-hook": props.dataHook }, React.createElement(Draggable.Manager, { dataHook: dataHooks.provider }, React.createElement(Component, { ...props })))); WithDNDContext.displayName = Component.displayName; return WithDNDContext; }; //# sourceMappingURL=withDNDContext.js.map