UNPKG

@nodeject/ui-components

Version:

UI library for non-trivial components

46 lines (45 loc) 1.74 kB
/// <reference types="react" /> import { DragDropData, DragDropListsEvents, ItemProps, State } from '../dtos'; interface Components { ListHeader: React.ElementType; Item?: React.ElementType<ItemProps>; NewItem?: React.ElementType; NewItemButton?: React.ElementType; } export interface UseDragDropListsProps { classNameItem?: string; components?: Components; data: DragDropData; serverEvents: DragDropListsEvents; extraProps?: { [key: string]: any; }; options?: { showScrollbar?: boolean; itemDropAnimationDuration?: number; itemDragAnimationDuration?: number; listDropAnimationDuration?: number; listDragAnimationDuration?: number; }; } export declare const DragDropListsContainer: import("unstated-next").Container<{ classNameItem: string; components: Components; extraProps: { [key: string]: any; }; itemDropAnimationDuration: number; itemDragAnimationDuration: number; listDropAnimationDuration: number; listDragAnimationDuration: number; onDropItem: (listId: string, { addedIndex: targetIndex, removedIndex: sourceIndex, payload: id, }: import("@richardrout/smooth-dnd").DropResult) => void; onDropList: ({ addedIndex, removedIndex }: import("@richardrout/smooth-dnd").DropResult) => void; onItemClick: (id: string) => void; onItemDelete: (args: import("../dtos").OnItemDeleteArgs) => Promise<void>; onSaveNewItemClicked: (args: import("../dtos").OnNewItemClickedArgs) => void; showNewItemListId: string; showScrollbar: boolean; state: State; toggleShowNewItem: (listId: any) => void; }, UseDragDropListsProps>; export {};