@mui/base
Version:
A library of headless ('unstyled') React UI components and low-level hooks.
11 lines (10 loc) • 567 B
TypeScript
import { UseListItemParameters, UseListItemReturnValue } from './useListItem.types';
/**
* Contains the logic for an item of a list-like component (e.g. Select, Menu, etc.).
* It provides information about the item's state (selected, highlighted) and
* handles the item's mouse events.
*
* @template ItemValue The type of the item's value. This should be consistent with the type of useList's `items` parameter.
* @ignore - internal hook.
*/
export default function useListItem<ItemValue>(parameters: UseListItemParameters<ItemValue>): UseListItemReturnValue;