|
4 | 4 | [](https://david-dm.org/mohsinulhaq/react-popper-tooltip) |
5 | 5 | [](https://github.com/prettier/prettier) |
6 | 6 |
|
7 | | -React tooltip component based on [react-popper](https://github.com/FezVrasta/react-popper). |
| 7 | +React tooltip component based on [react-popper](https://github.com/FezVrasta/react-popper), the |
| 8 | +React wrapper around [popper.js](https://popper.js.org/) library. |
8 | 9 |
|
9 | 10 | ## Example |
10 | 11 | https://codesandbox.io/s/v04l1ky2rl |
@@ -49,7 +50,7 @@ if you're not familiar with this approach. |
49 | 50 |
|
50 | 51 | The package itself doesn't expose any styles and doesn't render anything. To start using it you |
51 | 52 | have to provide styles and markup for the tooltip to be displayed. You may use default styles from |
52 | | -`react-popper-tooltip/styles.css` or add your own. |
| 53 | +`react-popper-tooltip/dist/styles.css` or add your own. |
53 | 54 |
|
54 | 55 | ### Tooltip.js |
55 | 56 |
|
@@ -80,7 +81,7 @@ const Tooltip = ({ tooltip, children, ...props }) => ( |
80 | 81 | export default Tooltip; |
81 | 82 | ``` |
82 | 83 |
|
83 | | -Then you can use as shown in the example below. |
| 84 | +Then you can use it as shown in the example below. |
84 | 85 |
|
85 | 86 | ```jsx |
86 | 87 | <Tooltip tooltip="Hi there!" placement="top" trigger="click">Click me</Tooltip> |
@@ -213,16 +214,16 @@ yourself to avoid your props being overridden (or overriding the props returned) |
213 | 214 |
|
214 | 215 | ### children function |
215 | 216 |
|
216 | | -| property | type | description | |
217 | | -|:---------------:|:--------------:|:---------------------------------------------------------------------:| |
| 217 | +| property | type | description | |
| 218 | +|-----------------|----------------|-----------------------------------------------------------------------| |
218 | 219 | | getTriggerProps | `function({})` | returns the props you should apply to the trigger element you render. | |
219 | 220 | | triggerRef | `node` | returns the react ref you should apply to the trigger element. | |
220 | 221 |
|
221 | 222 |
|
222 | 223 | ### tooltip function |
223 | 224 |
|
224 | | -| property | type | description | |
225 | | -|:---------------:|:--------------:|:---------------------------------------------------------------------:| |
| 225 | +| property | type | description | |
| 226 | +|-----------------|----------------|-----------------------------------------------------------------------| |
226 | 227 | | getTooltipProps | `function({})` | returns the props you should apply to the tooltip element you render. | |
227 | 228 | | tooltipRef | `node` | return the react ref you should apply to the tooltip element. | |
228 | 229 | | arrowStyle | `object` | return the styles you should apply to the tooltip arrow style attr. | |
|
0 commit comments