ui-dnd/dist/SortableList.d.ts
autocommit 2669050200 chore: initial package split from monorepo
Package: @lilith/ui-dnd
Split from: lilith/ui.git or lilith/build.git
Publish workflow: calls lilith/workflows/.forgejo/workflows/publish-npm.yml@main
2026-04-20 01:11:41 -07:00

31 lines
No EOL
902 B
TypeScript

/**
* SortableList Component
*
* A list-based sortable container with drag-and-drop reordering.
* Supports vertical and horizontal layouts.
*/
import { type ReactNode } from 'react';
import type { SortableListProps } from './types';
/**
* SortableList Component
*
* Renders items in a flex list with drag-and-drop reordering support.
*
* @example
* ```tsx
* const [tasks, setTasks] = useState(['Task 1', 'Task 2', 'Task 3']);
*
* <SortableList
* items={tasks}
* getItemKey={(item) => item}
* renderItem={(item, index, isDragging) => (
* <TaskCard title={item} />
* )}
* onReorder={setTasks}
* direction="vertical"
* gap={8}
* />
* ```
*/
export declare function SortableList<T>({ items, getItemKey, renderItem, onReorder, gap, direction, itemType: _itemType, disabled, className, }: SortableListProps<T>): ReactNode;
//# sourceMappingURL=SortableList.d.ts.map