UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

29 lines (28 loc) 1.21 kB
/** * Calculates the maximum number of items that can fit within a container. * * @param params - The parameters for the calculation. * @param params.bufferSize - The buffer size to subtract from the container size (default is 0). * @param params.containerSize - The total size of the container. * @param params.itemSizes - An array of sizes for each item. * @returns The maximum number of items that can fit within the container. */ export declare const calculateMaxItems: ({ bufferSize, containerSize, itemSizes, }: { bufferSize?: number; containerSize: number; itemSizes: number[]; }) => number; /** * Calculates the number of items that overflow a container. * * @param params - The parameters for the calculation. * @param params.bufferSize - The buffer size to subtract from the container size (default is 0). * @param params.containerSize - The total size of the container. * @param params.itemSizes - An array of sizes for each item. * @returns The number of items that overflow the container. */ export declare const getOverflowCount: ({ bufferSize, containerSize, itemSizes, }: { bufferSize?: number; containerSize: number; itemSizes: number[]; }) => number;