UNPKG

@octopusdeploy/design-system-components

Version:
38 lines (37 loc) 1.23 kB
import type { ReactNode } from "react"; export interface AccordionProps { /** * The title content rendered inside the `<summary>` element. Click to toggle the panel. */ summary: ReactNode; /** * The panel body content, visible when the accordion is open. */ children: ReactNode; /** * When true, renders a 1px top and bottom border. Adjacent Accordions sharing the same * `hasBorder` value collapse their shared border to a single 1px line. * @default false */ hasBorder?: boolean; /** * When true, removes the default padding from the content area. * Useful when the content handles its own layout and alignment. * @default false */ noPadding?: boolean; /** * When true, renders a 1px top border. * @default false */ hasTopBorder?: boolean; /** * When true, renders a 1px bottom border * @default false */ hasBottomBorder?: boolean; } /** * An accordion component built on the native `<details>` and `<summary>` elements. */ export declare function Accordion({ summary, children, hasBorder, noPadding, hasTopBorder, hasBottomBorder }: AccordionProps): import("react/jsx-runtime").JSX.Element;