@engie-group/fluid-design-system-react
Version:
Fluid Design System React
52 lines (51 loc) • 1.68 kB
TypeScript
import { ListItemProperties } from '@engie-group/fluid-types';
import React, { ReactNode } from 'react';
type ListItemSlots = {
/**
* Leading content of the list item, can be an icon or any React node.
*/
leading?: ReactNode;
/**
* Trailing content of the list item, can be an icon, a badge or any React node.
*/
trailing?: ReactNode;
};
export type NJListItemProps = React.ComponentPropsWithoutRef<'li'> & ListItemSlots & ListItemProperties & {
/**
* Whether list item is disabled or not
*/
disabled?: boolean;
/**
* Whether list item is selected or not
*/
selected?: boolean;
/**
* Whether list item is virtually focused or not
*/
virtuallyFocused?: boolean;
/**
* Whether the list item children are wrapped in an HTML element.
* Needed if you want to add interactivity to the list item with a button or a link.
*/
wrapperAsChild?: boolean;
};
export declare const NJListItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & ListItemSlots & ListItemProperties & {
/**
* Whether list item is disabled or not
*/
disabled?: boolean;
/**
* Whether list item is selected or not
*/
selected?: boolean;
/**
* Whether list item is virtually focused or not
*/
virtuallyFocused?: boolean;
/**
* Whether the list item children are wrapped in an HTML element.
* Needed if you want to add interactivity to the list item with a button or a link.
*/
wrapperAsChild?: boolean;
} & React.RefAttributes<HTMLLIElement>>;
export {};