UNPKG

@thaddeusjiang/react-sortable-list

Version:

You should focus the `features` of your app, not DnD boilerplate.

24 lines (23 loc) 717 B
import React, { FC } from 'react'; export declare type SortableItemProps = { id: string; DragHandler?: FC; className?: string; } & { [key: string]: any; }; export declare type ItemRenderProps = { item: SortableItemProps; }; export declare type ChildrenProps = { items: SortableItemProps[]; }; export declare type SortableListProps = { items: SortableItemProps[]; setItems: React.Dispatch<React.SetStateAction<SortableItemProps[]>>; itemRender?: ({ item }: ItemRenderProps) => JSX.Element; children?: ({ items }: ChildrenProps) => JSX.Element; horizontal?: boolean; disabled?: boolean; }; export declare const SortableList: FC<SortableListProps>;