@firecms/core
Version:
Awesome Firebase/Firestore-based headless open-source CMS
27 lines (26 loc) • 1.38 kB
TypeScript
import React from "react";
import { Entity, EntityCollection } from "../../types";
import { BoardItemViewProps } from "./board_types";
export type EntityBoardCardProps<M extends Record<string, any> = any> = BoardItemViewProps<M> & {
collection: EntityCollection<M>;
onClick?: (entity: Entity<M>) => void;
selected?: boolean;
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
selectionEnabled?: boolean;
};
/**
* Compact card component for displaying an entity in a Kanban board.
* Shows thumbnail, title, and optional selection checkbox.
*/
declare function EntityBoardCardInner<M extends Record<string, any> = any>({ item, isDragging, isGroupedOver, style, collection, onClick, selected, onSelectionChange, selectionEnabled }: EntityBoardCardProps<M>): import("react/jsx-runtime").JSX.Element;
export declare const EntityBoardCard: typeof EntityBoardCardInner;
/**
* Wrapper component that adapts EntityBoardCard to BoardItemViewProps interface
*/
export declare function createEntityBoardCardComponent<M extends Record<string, any>>(collection: EntityCollection<M>, options: {
onClick?: (entity: Entity<M>) => void;
isEntitySelected?: (entity: Entity<M>) => boolean;
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
selectionEnabled?: boolean;
}): React.ComponentType<BoardItemViewProps<M>>;
export {};