UNPKG

571 BTypeScriptView Raw
1/// <reference types="react" />
2import { ListAction, ListActionContext } from '../useList';
3import { ActionWithContext } from '../utils/useControllableReducer.types';
4import { MenuInternalState } from './useMenu.types';
5export type MenuActionContext = ListActionContext<string> & {
6 listboxRef: React.RefObject<HTMLElement>;
7};
8export declare function menuReducer(state: MenuInternalState, action: ActionWithContext<ListAction<string>, MenuActionContext>): MenuInternalState | {
9 open: boolean;
10 highlightedValue: string | null;
11 selectedValues: string[];
12};