@bestyled/contrib-flatlist
Version:
Implementation of FlatList for the BeStyled Design System
33 lines (32 loc) • 859 B
TypeScript
import * as React from 'react';
import { ALIGNMENT } from './SizeAndPositionManager';
export interface RenderedRows {
startIndex: number;
stopIndex: number;
}
export interface FlatListProps<T> {
id?: string;
className?: string;
data: T[];
estimatedItemSize?: number;
height: number;
itemCount: number;
overscanCount?: number;
scrollToIndex?: number;
scrollToAlignment?: ALIGNMENT | string;
onScroll?(offset: number, event: UIEvent): void;
renderItem({ index: number, item: any }: {
index: any;
item: any;
}): React.ReactNode;
}
export interface VisibleState {
start?: number;
stop?: number;
}
export declare const FlatListChild: React.FC<{
measure: Function;
index: number;
style: React.CSSProperties;
}>;
export declare const FlatList: React.FC<FlatListProps<any>>;