UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

41 lines (40 loc) 1.4 kB
import { Scale } from '@engie-group/fluid-types'; import React, { ComponentPropsWithoutRef, PropsWithChildren } from 'react'; export type NJAccordionItemProps = PropsWithChildren & ComponentPropsWithoutRef<'details'> & { /** * Size of the Accordion item */ scale?: Extract<Scale, 'lg' | 'md'>; /** * Whether the toggle icon is place at the start of the item or not. */ hasLeadingToggleIcon?: boolean; /** * Whether the toggle use the alternative icons (plus/minus) or th default ones (chevron) */ hasAlternativeToggleIcon?: boolean; /** * Custom leading icon */ icon?: React.ReactElement<unknown>; }; export declare const NJAccordionItem: React.ForwardRefExoticComponent<{ children?: React.ReactNode | undefined; } & Omit<React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, "ref"> & { /** * Size of the Accordion item */ scale?: Extract<Scale, "lg" | "md">; /** * Whether the toggle icon is place at the start of the item or not. */ hasLeadingToggleIcon?: boolean; /** * Whether the toggle use the alternative icons (plus/minus) or th default ones (chevron) */ hasAlternativeToggleIcon?: boolean; /** * Custom leading icon */ icon?: React.ReactElement<unknown>; } & React.RefAttributes<HTMLDetailsElement>>;