1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/core/__mocks__/react-beautiful-dnd.tsx
Jari Kolehmainen 7b6d2fb20d disable workspaces for now
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-01-10 15:28:05 +02:00

56 lines
1.2 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,
DraggableProvidedDraggableProps,
DroppableProps,
DroppableProvidedProps,
} from "react-beautiful-dnd";
export const DragDropContext = ({ children }: DragDropContextProps) => <>{ children }</>;
export const Draggable = ({ children }: DraggableProps) => (
<>
{
children(
{
draggableProps: {} as DraggableProvidedDraggableProps,
innerRef: () => {},
},
{
isDragging: false,
isDropAnimating: false,
},
{
draggableId: "some-mock-draggable-id",
mode: "FLUID",
source: {
droppableId: "some-mock-droppable-id",
index: 0,
},
},
)
}
</>
);
export const Droppable = ({ children }: DroppableProps) => (
<>
{
children(
{
droppableProps: {} as DroppableProvidedProps,
innerRef: () => {},
},
{
isDraggingOver: false,
isUsingPlaceholder: false,
},
)
}
</>
);