UNPKG

virtua-restoration

Version:

<img src="./virtua-restoration.png" alt="Virtua Restoration" style="max-width: 1000px; width: 100%; display: block; margin: 0 auto 20px auto;">

31 lines (25 loc) 1.01 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; import { CacheSnapshot } from 'virtua'; interface CacheProvider { get: () => [number, CacheSnapshot] | undefined; set: (data: [number, CacheSnapshot]) => void; } type CacheSource = 'sessionStorage' | 'localStorage' | 'custom'; interface Props$1 { cacheKey: string; children: React.ReactNode; cacheSourceType?: CacheSource; customProvider?: CacheProvider; className?: string; style?: React.CSSProperties; } declare const VirtualizedList: ({ cacheKey, children, cacheSourceType, customProvider, className, style }: Props$1) => react_jsx_runtime.JSX.Element; interface Props { cacheKey: string; children: React.ReactNode; cacheSourceType?: CacheSource; customProvider?: CacheProvider; } declare const WindowVirtualizedList: ({ cacheKey, children, cacheSourceType, customProvider }: Props) => react_jsx_runtime.JSX.Element; export { VirtualizedList, WindowVirtualizedList };