UNPKG

@firecms/core

Version:

Awesome Firebase/Firestore-based headless open-source CMS

45 lines (44 loc) 1.49 kB
import { CollectionSize, ViewMode } from "../../types"; export type KanbanPropertyOption = { key: string; label: string; }; export type ViewModeToggleProps = { viewMode?: ViewMode; onViewModeChange?: (mode: ViewMode) => void; /** * Which view modes are enabled for this collection. * Only these modes will appear in the toggle. * Defaults to all three: ["table", "cards", "kanban"]. */ enabledViews?: ViewMode[]; /** * Current size for card/table views */ size?: CollectionSize; /** * Callback when size changes */ onSizeChanged?: (size: CollectionSize) => void; /** * Controlled open state for the popover */ open?: boolean; /** * Callback when popover open state changes */ onOpenChange?: (open: boolean) => void; /** * Available properties that can be used for kanban columns (enum properties) */ kanbanPropertyOptions?: KanbanPropertyOption[]; /** * Currently selected property for kanban columns */ selectedKanbanProperty?: string; /** * Callback when the kanban column property changes */ onKanbanPropertyChange?: (property: string) => void; }; export declare function ViewModeToggle({ viewMode, onViewModeChange, enabledViews, size, onSizeChanged, open, onOpenChange, kanbanPropertyOptions, selectedKanbanProperty, onKanbanPropertyChange }: ViewModeToggleProps): import("react/jsx-runtime").JSX.Element | null;