@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
29 lines (28 loc) • 1.42 kB
TypeScript
import type { IconProp } from "@fortawesome/fontawesome-svg-core";
import type { PropsFor } from "../../types.js";
export type AccordionItemProps = PropsFor<"div", {
/** Disabled accordion item */
disabled?: boolean;
/** Bool to remove padding from content div */
noPadding?: boolean;
/** Font Awesome icon reference (or string if using library) */
icon?: IconProp;
/** Title to use for long titles cut off with ellipsis, not needed if title is string */
htmlTitle?: string;
/** Title of accordion item, supports any JSX content */
title: React.ReactNode;
/** Area placed next to the title (outside toggle area, also see `Accordion.Action`) */
actions?: React.ReactNode;
/** Bool to indicate when item should be opened (controlled accordion) */
active?: boolean;
/** Sets an accordion item to open initially */
defaultActive?: boolean;
/** Overrides default onClick on Accordion.Item */
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
/** props forwarded to underlying `<button>` element */
buttonProps?: PropsFor<"button">;
/** Render children even when `<Accordion.Item>` is collapsed. (default `false`) */
eager?: boolean;
}>;
declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
export default AccordionItem;