import React from "react"; import { SpaceProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; export interface AccordionProps extends SpaceProps, TagProps { id?: string; /** Content of the Accordion component */ children?: React.ReactNode; /** Set the default state of expansion of the Accordion if component is to be used as uncontrolled */ defaultExpanded?: boolean; /** * Disable padding for the content. * @deprecated Padding is no longer applied to the Accordion content by default. Any desired spacing can be applied directly to the provided content. */ disableContentPadding?: boolean; /** Sets the expansion state of the Accordion if component is to be used as controlled */ expanded?: boolean; /** Styled system spacing props provided to Accordion Title */ headerSpacing?: SpaceProps; /** Title of the Accordion */ title: React.ReactNode; /** Title of the Accordion when it is open */ openTitle?: string; /** Sets accordion sub title */ subTitle?: string; /** Callback fired when expansion state changes */ onChange?: (event: React.MouseEvent | React.KeyboardEvent, isExpanded: boolean) => void; /** Sets Accordion size */ size?: "small" | "medium" | "large"; /** * Sets Accordion borders. * * **Deprecation Warning:** The "full" borders are deprecated and will be removed in a future release. */ borders?: "default" | "none" | "full"; /** Sets Accordion width */ width?: string; /** * Sets Accordion variant. * * **Deprecation Warning:** The "subtle" variant is deprecated, please use "simple" instead. */ variant?: "standard" | "simple" | "subtle"; /** * Sets icon type * @deprecated Custom icon types on accordions are deprecated and will be removed in a future release. */ iconType?: "chevron_down" | "chevron_down_thick" | "dropdown"; /** * Sets icon alignment. * @deprecated Icon alignment on accordions is deprecated and will be removed in a future release. Icons will now render on the left by default. */ iconAlign?: "left" | "right"; /** * An error message to be displayed in the tooltip. * @deprecated Validation messages on accordions are no longer supported. */ error?: string; /** * A warning message to be displayed in the tooltip. * @deprecated Validation messages on accordions are no longer supported. */ warning?: string; /** * An info message to be displayed in the tooltip. * @deprecated Validation messages on accordions are no longer supported. */ info?: string; } export interface AccordionInternalProps { /** @ignore @private */ handleKeyboardAccessibility?: (ev: React.KeyboardEvent, index?: number) => void; /** @ignore @private */ index?: number; } export declare const Accordion: React.ForwardRefExoticComponent>; export default Accordion;