@payfit/unity-components
Version:
37 lines (36 loc) • 1.2 kB
TypeScript
import { ListLayout } from 'react-aria-components/Virtualizer';
/**
* Configuration for list virtualization.
* @remarks
* - `estimatedRowHeight` should ideally reference a design token
* - `estimatedHeadingHeight` should ideally reference a design token
* - These values affect scroll behavior and performance
*/
export declare const VIRTUALIZATION_CONFIG: {
readonly layout: typeof ListLayout;
readonly layoutOptions: {
/**
* Estimated height of each list item in pixels.
* Used for virtualization calculations.
*/
readonly estimatedRowHeight: number;
/**
* Estimated height of section headings in pixels.
* Used for virtualization calculations.
*/
readonly estimatedHeadingHeight: number;
/**
* Gap between items in pixels
*/
readonly gap: 0;
/**
* Reserves room for the 2px focus outline and its 2px outset offset.
*/
readonly padding: number;
};
};
/**
* Default threshold for showing search input.
* Search is shown automatically when item count exceeds this value.
*/
export declare const DEFAULT_SEARCH_THRESHOLD = 10;