mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import React from "react";
|
|
|
|
import type {
|
|
DragDropContextProps,
|
|
DraggableProps,
|
|
DraggableProvided,
|
|
DraggableProvidedDraggableProps,
|
|
DraggableStateSnapshot,
|
|
DroppableProps,
|
|
DroppableProvided,
|
|
DroppableProvidedProps,
|
|
DroppableStateSnapshot,
|
|
} from "react-beautiful-dnd";
|
|
|
|
export const DragDropContext = ({ children }: DragDropContextProps) => <>{ children }</>;
|
|
export const Draggable = ({ children }: DraggableProps) => (
|
|
<>
|
|
{
|
|
children(
|
|
{
|
|
draggableProps: {} as DraggableProvidedDraggableProps,
|
|
innerRef: () => {},
|
|
} as unknown as DraggableProvided,
|
|
{
|
|
isDragging: false,
|
|
isDropAnimating: false,
|
|
} as DraggableStateSnapshot,
|
|
{
|
|
draggableId: "some-mock-draggable-id",
|
|
type: "FLUID",
|
|
source: {
|
|
droppableId: "some-mock-droppable-id",
|
|
index: 0,
|
|
},
|
|
},
|
|
)
|
|
}
|
|
</>
|
|
);
|
|
export const Droppable = ({ children }: DroppableProps) => (
|
|
<>
|
|
{
|
|
children(
|
|
{
|
|
droppableProps: {} as DroppableProvidedProps,
|
|
innerRef: () => {},
|
|
} as unknown as DroppableProvided,
|
|
{
|
|
isDraggingOver: false,
|
|
isUsingPlaceholder: false,
|
|
} as DroppableStateSnapshot,
|
|
)
|
|
}
|
|
</>
|
|
);
|