Tooltip
Installation
- yarn
- pnpm
- npm
yarn add @mercell/tooltip-react
pnpm add @mercell/tooltip-react
npm install --save @mercell/tooltip-react
The Tooltip has necessary peerDependencies, please make sure that you have them in your project
"@mercell/tailwind": "^6.0.1",
"@mercell/use-media-query-react-hook": "^3.0.5",
"classnames": "^2.3.1",
"react": "^17.0.2"
Usage
Using the Tooltip component is as simple as importing it like this.
import { Tooltip } from '@mercell/tooltip-react';
Types, definitions, etc.
- Types
- Changelog
- Figma
TooltipProps
interface TooltipProps {
message: React.ReactNode;
placement?: Placement;
tooltipInnerWrapperClassName?: string;
tooltipMessageClassName?: string;
tooltipArrowClassName?: string;
} & JSX.IntrinsicElements['div']
Name | Type | Default | Required | Description |
---|---|---|---|---|
message | ReactNode | - | yes | The message displayed in the tooltip. See example above for simple string example and more advanced element example |
placement | Placement | auto | no | String input to select the tooltip placement. Defaults to auto |
tooltipInnerWrapperClassName | string | - | no | Add custom classnames to the inner wrapper |
tooltipMessageClassName | string | - | no | Add custom classnames to the inner message of the tooltip instead of the tooltip itself |
tooltipArrowClassName | string | - | no | Add custom classnames to the tooltip arrow |
Placement
type Placement =
| 'top'
| 'bottom'
| 'right'
| 'left'
| 'top-start'
| 'top-end'
| 'bottom-start'
| 'bottom-end'
| 'right-start'
| 'right-end'
| 'left-start'
| 'left-end'
| 'auto'
| 'auto-start'
| 'auto-end';
Change Log - @mercell/tooltip-react
This log was last generated on Mon, 27 Feb 2023 16:10:52 GMT and should not be manually modified.
5.0.2
Mon, 27 Feb 2023 16:10:52 GMT
Patches
- Fix typo in zindex classname
5.0.1
Mon, 27 Feb 2023 15:03:01 GMT
Patches
- Add zindex and className access to the popper wrapper
5.0.0
Fri, 11 Nov 2022 09:18:57 GMT
Breaking changes
- New styling approach - use only tailwind classes, add tailwind-merge library
4.0.0
Thu, 15 Sep 2022 06:07:41 GMT
Breaking changes
- Migration to Tailwind3, React 18 and ViteJS from webpack.
3.0.9
Thu, 30 Jun 2022 10:57:49 GMT
Patches
- Package.json refactor, add test suite, more tests soon
3.0.8
Tue, 03 May 2022 10:38:35 GMT
Patches
- Bump of popper library
3.0.7
Fri, 08 Apr 2022 10:19:50 GMT
Patches
- Bump dependencies
3.0.6
Fri, 01 Apr 2022 12:18:25 GMT
Patches
- Fix from UX feedback
3.0.5
Mon, 28 Feb 2022 12:45:49 GMT
Patches
- Dependency update
3.0.4
Mon, 28 Feb 2022 10:55:32 GMT
Patches
- Bump typescript
3.0.3
Tue, 01 Feb 2022 13:00:55 GMT
Patches
- Package json fix
3.0.2
Wed, 26 Jan 2022 16:19:19 GMT
Patches
- Move dependencies to peerDependencies to avoid duplication in installation process in project
- Adding the same peerDependencies to devDependencies
3.0.1
Tue, 18 Jan 2022 14:33:13 GMT
Patches
- Update design to match figma
3.0.0
Wed, 15 Dec 2021 22:20:34 GMT
Breaking changes
- Update to match figma design
2.0.7
Thu, 02 Dec 2021 13:12:30 GMT
Patches
- Fix tooltip style
2.0.6
Mon, 15 Nov 2021 12:15:06 GMT
Patches
- Adjust color for tooltip
2.0.5
Fri, 12 Nov 2021 13:08:30 GMT
Patches
- Add @mercell/tailwind to devDeps to be always up to date
2.0.4
Fri, 05 Nov 2021 11:10:13 GMT
Patches
- Bump peerDependency
2.0.3
Thu, 04 Nov 2021 10:10:16 GMT
Patches
- Tailwind type fix
- Revert tailwind version
2.0.2
Wed, 03 Nov 2021 15:28:42 GMT
Patches
- react types >=17
2.0.1
Wed, 27 Oct 2021 12:53:13 GMT
Patches
- Gitignore fix
2.0.0
Mon, 18 Oct 2021 07:16:21 GMT
Breaking changes
- New local build process with webpack without storybook, add npmignore and update dependencies
1.1.0
Wed, 08 Sep 2021 10:56:38 GMT
Minor changes
- correct mobile behavior, make tooltip message react node
1.0.0
Wed, 01 Sep 2021 16:58:57 GMT
Breaking changes
- Tooltip component
Sometimes it can take some time until Figma will render component inside embed iframe. Try to click plus icon to 'reset' initial loader. (Works only in Chrome)
Click me to open figma in the new card