alinea
Version:
Headless git-based CMS
15 lines (14 loc) • 569 B
TypeScript
import { type KeyboardEvent, type PropsWithChildren, type 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 {};