react-popper-tooltip
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -83,3 +83,3 @@ 'use strict'; | ||
}, | ||
offset: [0, 4], | ||
offset: [0, 7], | ||
trigger: 'hover' | ||
@@ -86,0 +86,0 @@ }; |
@@ -79,3 +79,3 @@ import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose'; | ||
}, | ||
offset: [0, 4], | ||
offset: [0, 7], | ||
trigger: 'hover' | ||
@@ -82,0 +82,0 @@ }; |
{ | ||
"name": "react-popper-tooltip", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "React tooltip library built around react-popper", | ||
@@ -5,0 +5,0 @@ "author": "Mohsin Ul Haq <mohsinulhaq01@gmail.com>", |
@@ -11,24 +11,23 @@ # react-popper-tooltip | ||
## Docs | ||
## NOTE | ||
NOTE: This is the documentation for v4.x which introduced the `usePopperTooltip` hook. | ||
If you're looking for the render prop version, | ||
> - This is the documentation for 4.x which introduced the `usePopperTooltip` hook. | ||
> - If you're looking for the render prop version, | ||
see [3.x docs](https://github.com/mohsinulhaq/react-popper-tooltip/blob/v3/README.md). | ||
> - If you're looking to upgrade from 3.x render prop to 4.x hook, please refer to our [migration guide](migrating.md). | ||
If you're moving from 3.x render prop to 4.x hook, read our [migration guide](migrating.md). | ||
## Examples | ||
- Basic usage [Demo]() [Source](/examples/basic) | ||
- Animating appearance with react-spring [Demo]() [Source](/examples/animation) | ||
- Closing tooltip with Esc button [Demo]() [Source](/examples/close-on-esc) | ||
- Using as a controlled component [Demo]() [Source](/examples/controlled) | ||
- Persist the tooltip in the DOM once it's mounted [Demo]() [Source](/examples/persist-once-mounted) | ||
- Using with react portal [Demo]() [Source](/examples/portal) | ||
- Implementing render prop API [Demo]() [Source](/examples/render-prop) | ||
- Basic usage [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/basic) ([Source](/examples/basic)) | ||
- Animating appearance with react-spring [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/animation) ([Source](/examples/animation)) | ||
- Closing tooltip with Esc button [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/close-on-esc) ([Source](/examples/close-on-esc)) | ||
- Using as a controlled component [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/) ([Source](/examples/controlled)) | ||
- Persist the tooltip in the DOM once it's mounted [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/persist-once-mounted) ([Source](/examples/persist-once-mounted)) | ||
- Using with react portal [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/portal) ([Source](/examples/portal)) | ||
- Implementing render prop (v3) API [Demo](https://codesandbox.io/s/github/mohsinulhaq/react-popper-tooltip/tree/master/examples/render-prop) ([Source](/examples/render-prop)) | ||
## Installation | ||
You can install **react-popper-tooltip** with [NPM](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/). | ||
You can install **react-popper-tooltip** with [npm](https://www.npmjs.com) or [yarn](https://yarnpkg.com). | ||
@@ -169,6 +168,6 @@ ```bash | ||
- `offset: [number, number]`, defaults to `[0, 4]` | ||
- `offset: [number, number]`, defaults to `[0, 7]` | ||
This is a shorthand for `popperOptions.modifiers` offset modifier option. The default value means the tooltip will be | ||
placed 4px away from the trigger element (to reserve enough space for the arrow element). | ||
placed 7px away from the trigger element (to reserve enough space for the arrow element). | ||
@@ -178,3 +177,3 @@ We use this default value to match the size of the arrow element from our default CSS file. Feel free to change it if you are using your | ||
See [offset modifier docs](https://popper.js.org/docs/v2/modifiers/offset/). | ||
See [offset modifier docs](https://popper.js.org/docs/v2/modifiers/offset). | ||
@@ -265,5 +264,5 @@ `popperOptions` takes precedence over this option. | ||
Some props returned by the underlying `usePopper` hook. | ||
See [https://popper.js.org/react-popper/v2/hook/](https://popper.js.org/react-popper/v2/hook/). | ||
See [https://popper.js.org/react-popper/v2/hook](https://popper.js.org/react-popper/v2/hook). | ||
This doesn't include `styles` and `attributes` props. They are included into `getArrowProps` and `getTooltipProps` prop | ||
getters. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1030731
12
5619
265