@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
15 lines (14 loc) • 516 B
TypeScript
import * as React from 'react';
import { InteractionType } from './useEnhancedClickHandler.js';
/**
* Determines the interaction type (keyboard, mouse, touch, etc.) that opened the component.
*
* @param open The open state of the component.
*/
export declare function useOpenInteractionType(open: boolean): {
openMethod: InteractionType | null;
triggerProps: {
onClick: (event: React.MouseEvent | React.PointerEvent) => void;
onPointerDown: (event: React.PointerEvent) => void;
};
};