UNPKG

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

Version:

Fluid Design System React

57 lines (56 loc) 1.65 kB
import React from 'react'; import { IListItemProps } from './NJListItem'; declare const listDensityStyleToCssClasses: TListSize; export declare const NJList: React.ForwardRefExoticComponent<IListProps & React.RefAttributes<HTMLUListElement>>; type TListSize = { normal: string; dense: string; }; export interface IListProps extends React.ComponentPropsWithoutRef<'ul'> { /** * List density */ density?: keyof typeof listDensityStyleToCssClasses; /** * Whether list should have a border or not */ isBorderless?: boolean; /** * Whether the list items have a gap between them */ hasSpaceBetweenItems?: boolean; /** * ListItem components **/ children: React.ReactElement<IListItemProps> | React.ReactElement<IListItemProps>[]; /** * Add role="listbox" and tabindex="-1" to the element. * * Used by `nj-select` for accessibility reasons. */ isCustomSelectList?: boolean; /** * Whether it is a checkbox list or not */ isCheckboxList?: boolean; /** * Whether list is multi-select or not, to add the necessary accessible labels */ isMultiSelect?: boolean; /** * Optional id * @deprecated Prefer using `id` props. */ listId?: string; /** * Accessible label for the list when using "listbox" role. * @deprecated Prefer using `aria-label` props. */ ariaLabel?: string; /** * Function called on list item keydown * @deprecated Prefer using `onKeyDown` props. */ onKeydown?: React.KeyboardEventHandler<HTMLUListElement | HTMLDivElement>; } export {};