UNPKG

@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 543 B
import * as React from 'react'; import { InteractionType } from '@base-ui-components/utils/useEnhancedClickHandler'; /** * 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; reset: () => void; triggerProps: { onClick: (event: React.MouseEvent | React.PointerEvent) => void; onPointerDown: (event: React.PointerEvent) => void; }; };