@tdcerhverv/tooltip
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

Tooltip Component

Tooltips display informative text when users hover over, focus on, or tap an element.

Props

title: string; // the text shown by the Tooltip
isHidden?: boolean; // supply for scenarios you don't want to show it, regardless of its internal state
children: ReactElement; // the element that will show the Tooltip on hover

Example of usage

import { Tooltip } from '@tdcerhverv/tooltip';
import { DefaultButton } from '@tdcerhverv/button';
import { Icon } from '@tdcerhverv/icon';
import Settings from '@tdcerhverv/parrotfish/dist/icons/Icons/Settings.svg';

const ButtonWithTooltip = () => (
  <Tooltip title="Settings">
    <DefaultButton>
      <Icon icon={Settings} size={16} />
    </DefaultButton>
  </Tooltip>
);

Useful links

Readme

Keywords

none

Package Sidebar

Install

npm i @tdcerhverv/tooltip

Weekly Downloads

2

Version

1.3.2

License

Apache-2.0

Unpacked Size

163 kB

Total Files

12

Last publish

Collaborators

  • antongb
  • dev_jonas
  • jeppebenjaminsen
  • ahhah
  • abdok
  • mikkv
  • clausr1990
  • tdc-sigbe
  • mdige
  • nuudaybot
  • tdc-olila
  • jeroen.dk.nl
  • renand
  • stegr
  • m84100
  • m92212
  • m87979
  • vertic
  • rasladev
  • muddz
  • tajsonik
  • linnt
  • molg