UNPKG

virtua

Version:

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.

21 lines (20 loc) 804 B
import { JSX, ParentComponent } from "solid-js"; export type ViewportComponentAttributes = Pick<JSX.HTMLAttributes<HTMLElement>, "class" | "id" | "role" | "tabIndex" | "onKeyDown" | "onWheel"> & JSX.AriaAttributes & { style?: JSX.CSSProperties; }; export interface CustomContainerComponentProps { style: JSX.CSSProperties; children: JSX.Element; ref?: any | (() => any); } export type CustomContainerComponent = ParentComponent<CustomContainerComponentProps>; /** * Props of customized item component for {@link Virtualizer} or {@link WindowVirtualizer}. */ export interface CustomItemComponentProps { style: JSX.CSSProperties; index: number; children: JSX.Element; ref?: any | (() => any); } export type CustomItemComponent = ParentComponent<CustomItemComponentProps>;