UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

72 lines (71 loc) 1.72 kB
import { ScrollerListProps } from "@etsoo/react"; import React from "react"; import { MouseEventWithDataHandler } from "./MUGlobal"; /** * Extended ScrollerList inner item renderer props */ export type ScrollerListExItemRendererProps<T> = { /** * Row index */ index: number; /** * Row data */ data: T; /** * Style */ style: React.CSSProperties; /** * Item selected */ selected: boolean; }; /** * Default styles for item renderer */ export declare const ScrollerListExItemDefaultStyles: React.CSSProperties; /** * Extended ScrollerList Props */ export type ScrollerListExProps<T extends object> = Omit<ScrollerListProps<T>, "rowComponent" | "rowHeight" | "onClick" | "onDoubleClick" | "onInitLoad"> & Partial<Pick<ScrollerListProps<T>, "rowHeight">> & { /** * Alternating colors for odd/even rows */ alternatingColors?: [string?, string?]; /** * Cache key */ cacheKey?: string; /** * Cache minutes */ cacheMinutes?: number; /** * Item renderer */ itemRenderer?: (props: ScrollerListExItemRendererProps<T>) => React.ReactNode; /** * Double click handler */ onDoubleClick?: MouseEventWithDataHandler<T>; /** * Click handler */ onClick?: MouseEventWithDataHandler<T>; /** * On items select change */ onSelectChange?: (selectedItems: T[]) => void; /** * Selected color */ selectedColor?: string; }; /** * Extended ScrollerList * @param props Props * @returns Component */ export declare function ScrollerListEx<T extends object>(props: ScrollerListExProps<T>): import("react/jsx-runtime").JSX.Element;