@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
16 lines (15 loc) • 696 B
TypeScript
import type * as React from "react";
import type { Event } from "../../common/types";
declare const useErrorTooltip: <T = HTMLInputElement, K = HTMLLabelElement>({ onFocus, hasTooltip, }: {
onFocus?: Event<React.FocusEvent<T, Element>> | undefined;
hasTooltip?: boolean | undefined;
}) => {
tooltipShown: boolean;
tooltipShownHover: boolean;
setTooltipShown: React.Dispatch<React.SetStateAction<boolean>>;
setTooltipShownHover: React.Dispatch<React.SetStateAction<boolean>>;
labelRef: React.MutableRefObject<K | null>;
iconRef: React.MutableRefObject<HTMLDivElement | null>;
handleFocus: Event<React.FocusEvent<T, Element>>;
};
export default useErrorTooltip;