alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
15 lines (14 loc) • 554 B
TypeScript
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 {};