stream-chat-react
Version:
React components to create chat conversations or livestream style chat
23 lines • 910 B
TypeScript
type GetNextRovingFocusIndexArgs = {
activeIndex: number;
itemCount: number;
key: string;
};
export declare const getNextRovingFocusIndex: ({ activeIndex, itemCount, key, }: GetNextRovingFocusIndexArgs) => number | null;
type RovingFocusKeyboardEvent = {
currentTarget: Element;
key: string;
preventDefault: () => void;
};
type CreateRovingFocusKeyDownHandlerParams<T extends {
focus: () => void;
}> = {
focusItem?: (item: T, event: RovingFocusKeyboardEvent) => void;
getActiveIndex?: (items: T[], event: RovingFocusKeyboardEvent) => number;
getItems: (event: RovingFocusKeyboardEvent) => T[];
};
export declare const createRovingFocusKeyDownHandler: <T extends {
focus: () => void;
}>({ focusItem, getActiveIndex, getItems, }: CreateRovingFocusKeyDownHandlerParams<T>) => (event: RovingFocusKeyboardEvent) => void;
export {};
//# sourceMappingURL=a11yUtils.d.ts.map