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.

38 lines (37 loc) 1.29 kB
import * as React from 'react'; import { FloatingEvents } from '@floating-ui/react'; import { GenericHTMLProps } from '../../utils/types.js'; export declare function useMenuSubmenuTrigger(parameters: useSubmenuTrigger.Parameters): useSubmenuTrigger.ReturnValue; export declare namespace useSubmenuTrigger { interface Parameters { id: string | undefined; highlighted: boolean; /** * Whether the component should ignore user interaction. */ disabled: boolean; /** * The ref of the item. */ ref?: React.Ref<Element>; /** * The FloatingEvents instance of the menu's root. */ menuEvents: FloatingEvents; /** * A callback to set the trigger element whenever it's mounted. */ setTriggerElement: (element: HTMLElement | null) => void; /** * Whether to treat mouseup events as clicks. */ allowMouseUpTriggerRef: React.RefObject<boolean>; /** * A ref that is set to `true` when the user is using the typeahead feature. */ typingRef: React.RefObject<boolean>; } interface ReturnValue { getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; } }