Files
video-gen/video-gen-admin/node_modules/antd/lib/masonry/hooks/usePositions.d.ts
T
2026-05-25 17:08:18 +08:00

13 lines
484 B
TypeScript

import type { Key } from 'react';
export type ItemHeightData = [key: Key, height: number, column?: number];
export type ItemPositions = Map<Key, {
column: number;
top: number;
}>;
/**
* Auto arrange the items in the masonry layout.
* Always get stable positions by order
* instead of dynamic adjust for next item height.
*/
export default function usePositions(itemHeights: ItemHeightData[], columnCount: number, verticalGutter: number): readonly [ItemPositions, number];