UNPKG

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

Version:

Fluid Design System React

41 lines (40 loc) 1.38 kB
import React, { ComponentPropsWithoutRef, PropsWithChildren } from 'react'; import { TSizeVariants } from '../../global'; export type NJAccordionItemProps = PropsWithChildren & ComponentPropsWithoutRef<'details'> & { /** * Size of the Accordion item */ scale?: Extract<TSizeVariants, '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; }; export declare const NJAccordionItem: React.ForwardRefExoticComponent<{ children?: React.ReactNode; } & Omit<React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, "ref"> & { /** * Size of the Accordion item */ scale?: Extract<TSizeVariants, '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; } & React.RefAttributes<HTMLDetailsElement>>;