UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

28 lines 1.22 kB
import { ColumnData } from '../types'; interface UseComputeBoardResizeParams { /** All columns in their normal order */ columns: ColumnData[]; /** The fixed width you want each visible column to occupy (e.g. 300px) */ columnWidth: number; /** * Whether to reserve space for an overflow "dropdown" column on the far right. * If true and columns don't fit, the last column is replaced by a special * "overflow" column (with a dropdown). */ showOverflowDropdown: boolean; } /** * A custom hook to handle "fitting" columns horizontally: * - We measure how many columns at `columnWidth` can fit in the container * - Remaining columns become "overflow" columns. * - We track which overflow column is selected by ID. */ export declare function useComputeBoardResize({ columns, columnWidth, showOverflowDropdown, }: UseComputeBoardResizeParams): { containerRef: import('react').RefObject<HTMLDivElement | null>; fittedColumns: ColumnData[]; overflowColumns: ColumnData[]; selectedOverflowColumnId: string; setSelectedOverflowColumnId: import('react').Dispatch<import('react').SetStateAction<string>>; }; export {}; //# sourceMappingURL=useComputeBoard.d.ts.map