react-path-tooltip
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "react-path-tooltip", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "displayName": "React Path Tooltip", |
@@ -1,7 +0,12 @@ | ||
# React Path Tooltop | ||
# react-path-tooltop [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://img.shields.io/npm/v/react-path-tooltip.svg?style=flat)](https://www.npmjs.com/package/react-path-tooltip) [![Demo: Simple Example](https://img.shields.io/badge/demo-live-red.svg)](https://react-path-tooltip-simple-example.imfast.io) | ||
A simple yet beautiful react tooltip component for SVG-Paths. | ||
The component detects the SVG and Path locations/sizes. The component also detects the display text width of the tooltip. Based on that information a calculation is done so that the rendering of the tooltip will be optimized and correctly oriented. | ||
**Note:** When generating SVG with multiple paths, make sure to add the tooltips at the bottom of the SVG element, after all the paths are already displays. | ||
**Note:** In SVG, the rendering order is based on the document order. I.e. the first elements in the SVG document fragment getting "painted" first. Subsequent elements are painted on top of previously painted elements. To avoid issues with path elements rendered on top of tooltips, please place all tooltips below all content path elements. | ||
## Demo | ||
Click [here](https://react-path-tooltip-simple-example.imfast.io) for live demo. | ||
## Install | ||
@@ -18,3 +23,3 @@ | ||
~~~ | ||
```tsx | ||
import React from "react" | ||
@@ -42,3 +47,3 @@ import "./App.css" | ||
export default App | ||
~~~ | ||
``` | ||
@@ -64,5 +69,4 @@ ## Customization | ||
## License | ||
MIT | ||
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
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
48775
70