UNPKG

@activecollab/components

Version:

ActiveCollab Components

28 lines 1.13 kB
import React, { FC, ReactNode } from "react"; export interface IAccordion { /** Children type of node or string */ children?: ReactNode; /** ClassName */ className?: string; /** Could all items be collapsed */ allowZeroExpanded?: boolean; /** Could more than one item be expanded */ allowMultipleExpanded?: boolean; /** Callback function that will be called with id of the accordion item that was clicked */ onChange?: (itemId: string) => void; /** List of item id's that are expanded on initial render */ preExpanded?: string[]; /** Do not show the toggle icon in the AccordionItemHead component */ disableToggleIcon?: boolean; /** Custom toggle icon to replace the default one */ customToggleIcon?: ReactNode; } export interface IAccordionContextType { expandedItems: string[]; toggleExpanded: (itemId: string) => void; disableToggleIcon: boolean; customToggleIcon: ReactNode; } export declare const AccordionContext: React.Context<IAccordionContextType | null>; export declare const Accordion: FC<IAccordion>; //# sourceMappingURL=Accordion.d.ts.map