@firecms/core
Version:
Awesome Firebase/Firestore-based headless open-source CMS
43 lines (42 loc) • 1.21 kB
TypeScript
import React from "react";
import { BoardItem, BoardItemViewProps } from "./board_types";
import { ChipColorKey, ChipColorScheme } from "@firecms/ui";
export interface BoardColumnProps<M extends Record<string, any>> {
id: string;
title: string;
items: BoardItem<M>[];
index: number;
ItemComponent: React.ComponentType<BoardItemViewProps<M>>;
isDragging: boolean;
isDragOverColumn: boolean;
/**
* Whether column reordering is allowed (shows drag handle)
*/
allowReorder?: boolean;
/**
* Whether items are loading for this column
*/
loading?: boolean;
/**
* Whether there are more items to load
*/
hasMore?: boolean;
/**
* Callback to load more items
*/
onLoadMore?: () => void;
/**
* Callback to add a new item to this column
*/
onAddItem?: () => void;
/**
* Total count of entities in this column
*/
totalCount?: number;
/**
* Color of the column header indicator
*/
color?: ChipColorKey | ChipColorScheme;
style?: React.CSSProperties;
}
export declare const BoardColumn: <M extends Record<string, any>>(props: BoardColumnProps<M>) => React.ReactElement;