@types/react-hint
TypeScript icon, indicating that this package has built-in type declarations

3.2.4 • Public • Published

Installation

npm install --save @types/react-hint

Summary

This package contains type definitions for react-hint (https://github.com/slmgc/react-hint).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-hint.

import * as React from "react";

declare namespace ReactHintFactory {
    interface ReactHintProps {
        /**
         * Allows setting a custom tooltip attribute instead of the default one.
         *
         * @default "data-rh"
         */
        attribute?: string | undefined;

        /**
         * Autopositions tooltips based on closeness to window borders.
         *
         * @default false
         */
        autoPosition?: boolean | undefined;

        /**
         * You can override the tooltip style by passing the className property.
         *
         * @default "react-hint"
         */
        className?: string | undefined;

        /**
         * The default delay (in milliseconds) before showing/hiding the tooltip.
         *
         * @default 0
         */
        delay?: number | { show: number; hide: number } | undefined;

        /**
         * Enables/disables all events or a subset of events.
         *
         * @default false
         */
        events?: boolean | { click: boolean; focus: boolean; hover: boolean } | undefined;

        /**
         * Allows rendering of custom HTML content (with attached event handlers).
         * Pass a function which returns a react node.
         */
        onRenderContent?: ((target: HTMLElement, content: string) => React.ReactNode) | undefined;

        /**
         * Hide the tooltip only on outside click, hover, etc.
         *
         * @default false
         */
        persist?: boolean | undefined;

        /**
         * Allows setting the default tooltip placement.
         *
         * @default "top"
         */
        position?: "top" | "left" | "right" | "bottom" | undefined;
    }
}

declare function ReactHintFactory(react: typeof React): React.ComponentClass<ReactHintFactory.ReactHintProps>;

export = ReactHintFactory;

Additional Details

  • Last updated: Mon, 07 Oct 2024 22:07:58 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Lucas Ghizoni.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-hint

Weekly Downloads

448

Version

3.2.4

License

MIT

Unpacked Size

6.32 kB

Total Files

5

Last publish

Collaborators

  • types