diff --git a/package.json b/package.json index ee2d4ac..96939d1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@armco/shared-components", "description": "React Component Lib of independent components that can be utilised by sophisticated ones in @armco/components", - "version": "0.0.59", + "version": "0.0.60", "type": "module", "author": "Armco (@restruct-corporate-advantage)", "types": "build/types/index.d.ts", diff --git a/src/Draggable.tsx b/src/Draggable.tsx index 5aab00e..5f051b1 100755 --- a/src/Draggable.tsx +++ b/src/Draggable.tsx @@ -10,16 +10,10 @@ import React, { } from "react" import { useDrag } from "react-dnd" import { getEmptyImage } from "react-dnd-html5-backend" -import { ArDndItemTypes } from "./enums" import { BaseProps } from "@armco/types" +import { ArDndItemTypes } from "./enums" import "./Draggable.component.scss" -const dummyChildren = ( -
-) - export interface DraggableProps extends BaseProps { itemType?: ArDndItemTypes | string @@ -102,7 +96,6 @@ const Draggable = forwardRef((props: DraggableProps, ref) => { return styleObj as { [key: string]: string } } - const isDOMElement = typeof (firstChild as any)?.type === "string" const mergedStyle = { ...toPlainStyle(childStyles), ...toPlainStyle(style), @@ -110,26 +103,13 @@ const Draggable = forwardRef((props: DraggableProps, ref) => { opacity: isDragging ? 0.5 : 1, } as React.CSSProperties - if (isDOMElement) { - return cloneElement(firstChild as ReactElement