@cn-ui/core
Version:
The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.
20 lines (19 loc) • 736 B
TypeScript
import { type Atom, type JSXSlot } from "@cn-ui/reactive";
import { type Accessor, type JSXElement } from "solid-js";
export interface VirtualGridProps<T> {
each: T[][];
colSize?: number;
reverse?: boolean;
fallback?: JSXSlot;
estimateHeight?: number;
estimateWidth?: number;
/** 标识其 Key 值的属性,为了保证渲染的高效 */
getItemKey?: (index: number) => number | string;
children: (item: T, index: Accessor<number>, context: {
itemClass: Atom<string>;
itemRef: Atom<HTMLDivElement | null>;
}) => JSXElement;
transitionName?: string;
overscan?: number;
}
export declare function VirtualGrid<T>(props: VirtualGridProps<T>): import("solid-js").JSX.Element;