UNPKG

@plone/types

Version:

Plone's Types Package

30 lines (23 loc) 685 B
import { Location } from '../router'; import type { Content } from '../content'; import { BlocksFormData } from '../blocks'; export type SlotPredicate = (args: any) => boolean; export interface GetSlotArgs { content: Content; location: Location; navRoot?: Content; data?: BlocksFormData; [key: string]: unknown; } export type GetSlotReturn = | { component: SlotComponent['component']; name: string }[] | undefined; export type SlotComponent = { component: React.ComponentType<any>; predicates?: SlotPredicate[]; }; export type SlotManager = { slots: string[]; data: Record<string, SlotComponent[]>; }; export type SlotsConfig = Record<string, SlotManager>;