UNPKG

479 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 default function menuReducer(state: MenuInternalState, action: ActionWithContext<ListAction<string>, MenuActionContext>): MenuInternalState;