UNPKG

573 BTypeScriptView Raw
1import * as React from 'react';
2import { ListAction } from './listActions.types';
3import { ListItemState } from './useList.types';
4export interface ListContextValue<ItemValue> {
5 dispatch: (action: ListAction<ItemValue>) => void;
6 getItemState: (item: ItemValue) => ListItemState;
7 registerHighlightChangeHandler: (handler: (item: ItemValue | null) => void) => () => void;
8 registerSelectionChangeHandler: (handler: (items: ItemValue | ItemValue[] | null) => void) => () => void;
9}
10export declare const ListContext: React.Context<ListContextValue<any> | null>;