From 73468b3684d3f53583a97e0f9c816008121c857e Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 18 Jan 2024 16:50:43 -0500 Subject: [PATCH] feat(DragDrop): fix import warning --- .../src/next/components/DragDrop/DragDropSort.tsx | 10 +++++++++- .../src/next/components/DragDrop/DragDropUtil.tsx | 8 -------- .../src/next/components/DragDrop/examples/DragDrop.md | 2 +- .../next/components/DragDrop/examples/DragDropDemos.md | 2 +- .../src/next/components/DragDrop/index.ts | 1 - 5 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DragDropUtil.tsx diff --git a/packages/react-drag-drop/src/next/components/DragDrop/DragDropSort.tsx b/packages/react-drag-drop/src/next/components/DragDrop/DragDropSort.tsx index 35e9892d171..ea575265b8b 100644 --- a/packages/react-drag-drop/src/next/components/DragDrop/DragDropSort.tsx +++ b/packages/react-drag-drop/src/next/components/DragDrop/DragDropSort.tsx @@ -21,12 +21,20 @@ import { import { Draggable } from './Draggable'; import { DraggableDataListItem } from './DraggableDataListItem'; import { DraggableDualListSelectorListItem } from './DraggableDualListSelectorListItem'; -import { DraggableObject } from './DragDropUtil'; import styles from '@patternfly/react-styles/css/components/DragDrop/drag-drop'; export type DragDropSortDragEndEvent = DragEndEvent; export type DragDropSortDragStartEvent = DragStartEvent; +export interface DraggableObject { + /** Unique id of the draggable object */ + id: string; + /** Content rendered in the draggable object */ + content: React.ReactNode; + /** Props spread to the rendered wrapper of the draggable object */ + props?: any; +} + /** * DragDropSortProps extends dnd-kit's props which may be viewed at https://docs.dndkit.com/api-documentation/context-provider#props. */ diff --git a/packages/react-drag-drop/src/next/components/DragDrop/DragDropUtil.tsx b/packages/react-drag-drop/src/next/components/DragDrop/DragDropUtil.tsx deleted file mode 100644 index 3dc0faa7de2..00000000000 --- a/packages/react-drag-drop/src/next/components/DragDrop/DragDropUtil.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export interface DraggableObject { - /** Unique id of the draggable object */ - id: string; - /** Content rendered in the draggable object */ - content: React.ReactNode; - /** Props spread to the rendered wrapper of the draggable object */ - props?: any; -} diff --git a/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDrop.md b/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDrop.md index 195ddaf26c4..3b0e3116f09 100644 --- a/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDrop.md +++ b/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDrop.md @@ -15,7 +15,7 @@ import AngleDoubleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-d import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; import PficonSortCommonAscIcon from '@patternfly/react-icons/dist/esm/icons/pficon-sort-common-asc-icon'; -import { DragDropSort, DraggableObject } from '@patternfly/react-drag-drop'; +import { DragDropSort } from '@patternfly/react-drag-drop'; ## Sorting examples diff --git a/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDropDemos.md b/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDropDemos.md index 3cc75caf79c..0be4b53e561 100644 --- a/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDropDemos.md +++ b/packages/react-drag-drop/src/next/components/DragDrop/examples/DragDropDemos.md @@ -14,7 +14,7 @@ import AngleDoubleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-d import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; import PficonSortCommonAscIcon from '@patternfly/react-icons/dist/esm/icons/pficon-sort-common-asc-icon'; -import { DragDropSort, DraggableObject } from '@patternfly/react-drag-drop'; +import { DragDropSort } from '@patternfly/react-drag-drop'; ## Sorting demos diff --git a/packages/react-drag-drop/src/next/components/DragDrop/index.ts b/packages/react-drag-drop/src/next/components/DragDrop/index.ts index c8fbb82358b..ddc081716b1 100644 --- a/packages/react-drag-drop/src/next/components/DragDrop/index.ts +++ b/packages/react-drag-drop/src/next/components/DragDrop/index.ts @@ -1,2 +1 @@ export * from './DragDropSort'; -export * from './DragDropUtil';