UNPKG

@payfit/unity-components

Version:

37 lines (36 loc) 1.4 kB
import { ReactNode } from 'react'; /** * @description * The CollapsibleContent component renders the content that is shown or hidden * when the parent Collapsible component is expanded or collapsed. */ export interface CollapsibleContentProps { /** * The content to be shown or hidden. */ children: ReactNode; } /** * The content component for a Collapsible. * * This component renders a DisclosurePanel that shows or hides its content * based on the expanded state of the parent Collapsible component. * @example * ```tsx * <Collapsible> * <CollapsibleTitle>Section Title</CollapsibleTitle> * <CollapsibleContent> * This content will be shown or hidden based on the expanded state. * </CollapsibleContent> * </Collapsible> * ``` * @component * @see {@link Collapsible} - The parent component * @see {@link CollapsibleTitle} - The title component that toggles the expanded state * @param {CollapsibleContentProps} props - The component props * @param {ReactNode} props.children - The content to be shown or hidden * @param {React.Ref<HTMLDivElement>} ref - A ref to the underlying HTML div element * @returns {JSX.Element} The rendered CollapsibleContent component */ declare const CollapsibleContent: import('react').ForwardRefExoticComponent<CollapsibleContentProps & import('react').RefAttributes<HTMLDivElement>>; export { CollapsibleContent };