Skip to content

Commit 865a6ad

Browse files
Update Readme
1 parent da37891 commit 865a6ad

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
[![Dependency Status](https://david-dm.org/mohsinulhaq/react-popper-tooltip.svg)](https://david-dm.org/mohsinulhaq/react-popper-tooltip)
55
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
66

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.
89

910
## Example
1011
https://codesandbox.io/s/v04l1ky2rl
@@ -49,7 +50,7 @@ if you're not familiar with this approach.
4950

5051
The package itself doesn't expose any styles and doesn't render anything. To start using it you
5152
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.
5354

5455
### Tooltip.js
5556

@@ -80,7 +81,7 @@ const Tooltip = ({ tooltip, children, ...props }) => (
8081
export default Tooltip;
8182
```
8283

83-
Then you can use as shown in the example below.
84+
Then you can use it as shown in the example below.
8485

8586
```jsx
8687
<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)
213214

214215
### children function
215216

216-
| property | type | description |
217-
|:---------------:|:--------------:|:---------------------------------------------------------------------:|
217+
| property | type | description |
218+
|-----------------|----------------|-----------------------------------------------------------------------|
218219
| getTriggerProps | `function({})` | returns the props you should apply to the trigger element you render. |
219220
| triggerRef | `node` | returns the react ref you should apply to the trigger element. |
220221

221222

222223
### tooltip function
223224

224-
| property | type | description |
225-
|:---------------:|:--------------:|:---------------------------------------------------------------------:|
225+
| property | type | description |
226+
|-----------------|----------------|-----------------------------------------------------------------------|
226227
| getTooltipProps | `function({})` | returns the props you should apply to the tooltip element you render. |
227228
| tooltipRef | `node` | return the react ref you should apply to the tooltip element. |
228229
| arrowStyle | `object` | return the styles you should apply to the tooltip arrow style attr. |

0 commit comments

Comments
 (0)