UNPKG

@lonli-lokli/react-mosaic-component

Version:
25 lines (22 loc) 1.02 kB
import React__default from 'react'; import { ConnectDragSource, ConnectDragPreview } from 'react-dnd'; import { v as MosaicKey, e as MosaicPath, s as MosaicRootActions } from '../types-D_JoxNST.js'; import 'immutability-helper'; interface DraggableTabProps<T extends MosaicKey> { tabKey: T; tabIndex: number; tabContainerPath: MosaicPath; mosaicActions: MosaicRootActions<T>; mosaicId: string; children: (dragProps: { isDragging: boolean; connectDragSource: ConnectDragSource; connectDragPreview: ConnectDragPreview; }) => React__default.ReactElement; } /** * A draggable tab component that uses render props pattern * Works with both class and functional components */ declare const DraggableTab: <T extends MosaicKey>({ tabKey, tabIndex, tabContainerPath, mosaicActions, mosaicId, children, }: DraggableTabProps<T>) => React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>>; export { DraggableTab, type DraggableTabProps };