import type { ComponentChildren, FunctionComponent } from 'preact'; export interface ResultsAccordionProps { /** Name of the bundle task or other item (can have formatting, but should not have a header element) */ name: ComponentChildren; /** Index used for generating accordion element IDs */ index: number; result: 'success' | 'warning' | 'error'; /** Info that goes at the end of the header, inside the clickable area */ headerEndContent?: string; /** Commands to go at the end of the header, outside the clickable area */ headerCommands?: ComponentChildren; /** * Get the content, only if the section is expanded. * Use `CollapsibleResultsSubSection` for formatting (returning multiple sections if needed). * * This callback is to prevent rendering thousands of bundle result details unnecessarily. */ getContent: () => ComponentChildren; } export interface ResultsAccordionContentProps { /** Will be at start of sub-section and styled slightly larger if provided */ title?: string; /** Item name, such as "Input path". Ignored if `itemValue` is not provided. */ itemName?: string; /** Value corresponding to `itemName`, such as the path to a package. Requires `itemName`. */ itemValue?: ComponentChildren; /** Custom children */ children?: ComponentChildren; } /** * Collapsible section for displaying results of a bundle task or other item. * This handles the header formatting and layout, expanding/collapsing, and displaying content. */ export declare const ResultsAccordion: FunctionComponent; /** * Sub-section to return from `ResultsAccordionProps.getContent`. * If there are no children and no `itemValue`, the section will be ignored. */ export declare const ResultsAccordionContent: FunctionComponent; //# sourceMappingURL=ResultsAccordion.d.ts.map