UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

15 lines (14 loc) 554 B
import { KeyboardEvent, PropsWithChildren, Ref } from 'react'; type FocusListParams = { onClear: () => void; }; export declare function useFocusList({ onClear }: FocusListParams): { focusProps: { ref: Ref<any>; onKeyDown: (event: KeyboardEvent<HTMLElement>) => void; onBlur(): void; }; Container: ({ children }: PropsWithChildren<{}>) => import("react/jsx-runtime").JSX.Element; }; export declare function useFocusListItem<Element extends HTMLElement = HTMLElement>(onSelect: () => void): Ref<Element>; export {};