UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

27 lines (26 loc) 1.02 kB
import type { MouseEvent, ReactNode } from 'react'; import type { ButtonProps } from '../button/Button'; export type AccordionTertiaryProps = Omit<ButtonProps, 'variant' | 'children' | 'onClick'> & { /** * A title as a string or React element. It will be used as the button text. */ title?: ReactNode; /** * Use `true` or `false` to control the expanded/collapsed state of the accordion. */ expanded?: boolean; /** * If set to `true`, the open and close animation will be omitted. */ noAnimation?: boolean; /** * Will be called by user click interaction. Returns an object with a boolean state `expanded` inside `{ expanded, event }`. */ onChange?: (event: { expanded: boolean; event: MouseEvent; }) => void; children?: ReactNode; }; export type { AccordionTertiarySharedState } from './AccordionTertiaryContent'; export default function AccordionTertiary(props: AccordionTertiaryProps): import("react/jsx-runtime").JSX.Element;