Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TooltipHookReturnValue<E>

Note: This is really an internal type since this is handled automatically from the Tooltipped component.

remarks

@since 2.8.0

Type parameters

  • E: HTMLElement

Hierarchy

  • Omit<HoverModeHookReturnValue, "handlers" | "hoverHandlers">
    • TooltipHookReturnValue

Index

Properties

active: boolean

Boolean if the hover mode is currently working.

These are the props that should be provided to the element the tooltip is attached to.

handlers: Required<TooltippedElementEventHandlers<E>>

{@inheritDoc TooltippedElementEventHandlers}

setVisible: Dispatch<SetStateAction<boolean>>

A function to manually set the visibility state if you need even more custom behavior.

stuck: boolean

Boolean if the the visible state is true because the user clicked an element.

These props should be provided to the Tooltip component.

visible: boolean

Boolean if the temporary element should be visible.

Methods

  • clearHoverTimeout(): void
  • Clears the current onMouseEnter visibility timer.

    remarks

    @since 5.0.0

    Returns void

  • disableHoverMode(): void
  • A function that will disable the hover mode for all connected components. This should normally be called after leaving a hoverable element or the UserInteractionMode changes to "touch".

    Returns void

  • enableHoverMode(): void
  • A function that will enable the hover mode for all connected components. This should normally be called after hovering over an element for the HoverModeContext.visibleInTime.

    Returns void

  • onClick<E>(event: MouseEvent<E, MouseEvent>): void
  • An optional event handler to merge with the hover mode visibility handler. If this function calls event.stopPropagation(), the hover mode behavior will be disabled.

    Type parameters

    • E: HTMLElement

    Parameters

    • event: MouseEvent<E, MouseEvent>

    Returns void

  • onMouseEnter<E>(event: MouseEvent<E, MouseEvent>): void
  • An optional event handler to merge with the hover mode visibility handler. If this function calls event.stopPropagation(), the hover mode behavior will be disabled.

    Type parameters

    • E: HTMLElement

    Parameters

    • event: MouseEvent<E, MouseEvent>

    Returns void

  • onMouseLeave<E>(event: MouseEvent<E, MouseEvent>): void
  • An optional event handler to merge with the hover mode visibility handler. If this function calls event.stopPropagation(), the hover mode behavior will be disabled.

    Type parameters

    • E: HTMLElement

    Parameters

    • event: MouseEvent<E, MouseEvent>

    Returns void

  • startDisableTimer(): void
  • A function that will start a timer for disabling the hover mode for all connected components. This should normally be called after leaving a hoverable element

    Returns void

Generated using TypeDoc