@firecms/core
Version:
Awesome Firebase/Firestore-based headless open-source CMS
32 lines (31 loc) • 1.45 kB
TypeScript
import React from "react";
import { CollectionSize, Entity, EntityCollection, EntityTableController, SelectionController } from "../../types";
export type EntityCollectionCardViewProps<M extends Record<string, any> = any> = {
collection: EntityCollection<M>;
tableController: EntityTableController<M>;
onEntityClick?: (entity: Entity<M>) => void;
selectionController?: SelectionController<M>;
selectionEnabled?: boolean;
highlightedEntities?: Entity<M>[];
emptyComponent?: React.ReactNode;
onScroll?: (props: {
scrollDirection: "forward" | "backward";
scrollOffset: number;
scrollUpdateWasRequested: boolean;
}) => void;
initialScroll?: number;
/**
* Size of the cards in the grid view.
* - "xs": Extra small cards, most cards per row
* - "s": Small cards
* - "m": Medium cards (default)
* - "l": Large cards
* - "xl": Extra large cards, fewest cards per row
*/
size?: CollectionSize;
};
/**
* Card grid view for displaying entities with infinite scroll.
* Alternative to the EntityCollectionTable for visual browsing.
*/
export declare function EntityCollectionCardView<M extends Record<string, any> = any>({ collection, tableController, onEntityClick, selectionController, selectionEnabled, highlightedEntities, emptyComponent, onScroll, initialScroll, size }: EntityCollectionCardViewProps<M>): import("react/jsx-runtime").JSX.Element;