Skip to content

Commit 582b88e

Browse files
committed
fix documentation
1 parent c125f8f commit 582b88e

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ yarn add react-popper-tooltip
2525
```
2626
or
2727
```html
28-
<script src="https://unpkg.com/react-popper-tooltip/dist/index.js"></script>
28+
<script src="https://unpkg.com/react-popper-tooltip"></script>
2929
```
3030

3131
```jsx
@@ -231,10 +231,16 @@ The event that triggers the tooltip. One of `click`, `hover`, `right-click`, `no
231231

232232
### closeOnOutOfBoundaries
233233

234-
> `boolean` | defaults to `true`
234+
> `boolean` | defaults to `true`
235235
236236
Whether to close the tooltip when it's trigger is out of the boundary.
237237

238+
### usePortal
239+
240+
> `boolean` | defaults to `true`
241+
242+
Whether to use `React.createPortal` for creating tooltip.
243+
238244
### modifiers
239245

240246
> `object`

src/TooltipTrigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class TooltipTrigger extends PureComponent {
6666
*/
6767
closeOnOutOfBoundaries: T.bool,
6868
/**
69-
* whether to React.createPortal for creating tooltip
69+
* whether to use React.createPortal for creating tooltip
7070
*/
7171
usePortal: T.bool,
7272
/**

typings/react-popper-tooltip.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ declare module 'react-popper-tooltip' {
9999
* Defaults to true.
100100
*/
101101
closeOnOutOfBoundaries?: boolean;
102+
/** Whether to use React.createPortal for creating tooltip.
103+
* Defaults to true.
104+
*/
105+
usePortal?: boolean;
102106
/**
103107
* Modifiers passed directly to the underlying popper.js instance. For more
104108
* information, refer to Popper.js’ [modifier docs](https://popper.js.org/popper-documentation.html#modifiers).

0 commit comments

Comments
 (0)