import { type ReactNode, type HTMLAttributes } from 'react'; import { type WrapperProps } from './data-loader'; export type Props = { /** * The data to be displayed */ data: Datum[]; /** * Flag saying that data is loading, so we might be showing stale data */ loading?: boolean; /** * A function that returns a unique ID for each of the data objects. * Same function signature as a map function. */ getIdKey: (datum: Datum, index: number, data: Datum[]) => string; /** * A callback that is called whenever a user selects or unselects a row. */ onSelectionChange?: (event: MouseEvent | KeyboardEvent) => void; /** * A renderer function for each item of the list. * Make sure that it doesn't change unecessarily by wrapping it in useCallback */ dataRenderer: (datum: Datum) => ReactNode; }; type BasicDatum = Record; export declare const DataList: ({ data, getIdKey, dataRenderer, loading, onSelectionChange, className, ...props }: Props & HTMLAttributes) => import("react/jsx-runtime").JSX.Element; export declare const DataListWithLoader: (props: WrapperProps & Props & HTMLAttributes) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=data-list.d.ts.map