UNPKG

@cimpress/react-components

Version:
26 lines 1.33 kB
import { ReactNode, CSSProperties } from 'react'; import { PublicComponentProps } from '../types'; export interface AccordionProps extends PublicComponentProps { /** Optional actions displayed at the right-hand side of the accordion title area */ actions?: ReactNode; /** Inline styles to be applied to the accordion body div */ bodyStyle?: CSSProperties; /** Provide content for the accordion as children */ children?: ReactNode; /** Can be used to customize when the accordion should be open. If this prop is used, defaultOpen will be ignored */ customOpen?: boolean; /** Specify whether the accordion should be open or closed when it initially renders */ defaultOpen?: boolean; /** Inline styles to be applied to the accordion header div */ headerStyle?: CSSProperties; /** Function to be called when the accordion closes itself */ onClose?: () => void; /** Function to be called when the component is clicked */ onHeaderClick?: (e: any, isNowOpen: boolean) => void; /** Content for the title area of the accordion */ title?: ReactNode; /** Determines the visual variant of the accordion */ variant?: 'default' | 'ghost' | 'minimal'; } export declare function Accordion(props: AccordionProps): JSX.Element; //# sourceMappingURL=Accordion.d.ts.map