@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
31 lines (30 loc) • 1.39 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">;
}>;
/**
* A single pane for `<Accordion>` container
* @visibleName Accordion.Item
*/
declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
export default AccordionItem;