Skip to content

Commit 075d3eb

Browse files
docs: text improvements
1 parent 145e973 commit 075d3eb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/docs/examples/imperative-mode.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 1
44

55
# Imperative mode (ref)
66

7-
Using the ReactTooltip imperative mode to control the tooltip programatically.
7+
Using the ReactTooltip imperative mode to control the tooltip programmatically.
88

99
import { useRef } from 'react';
1010
import { Tooltip } from 'react-tooltip'
@@ -36,10 +36,10 @@ export const TooltipAnchor = ({ children, id, ...rest }) => {
3636

3737
### Basic usage
3838

39-
A ref object created with `React.useRef()` can passed to the `ref` tooltip prop.
40-
It allows you to expose internal state variables (read-only), and also to control the tooltip programatically.
39+
A ref object created with `React.useRef()` can be passed to the `ref` tooltip prop.
40+
It allows you to expose internal state variables (read-only), and to also control the tooltip programmatically.
4141

42-
The relevant interfaces are as follows:
42+
#### API
4343

4444
```ts
4545
interface TooltipImperativeOpenOptions {
@@ -85,19 +85,19 @@ interface TooltipImperativeProps {
8585

8686
:::info
8787

88-
The imperative methods <b>can</b> be applied alongside regular tooltip usage. For example, you could use just `close()` to close a regular tooltip after an API request is finished.
88+
The imperative methods <b>can</b> be applied alongside regular tooltip usage. For example, you could use just `close()` to close a regular tooltip after an HTTP request is finished.
8989

90-
If you intend on using the tooltip exclusively with these methods, setting the `imperativeModeOnly` tooltip prop to disable default behavior is recommended. Otherwise, you might face undesired behavior.
90+
If you intend to use the tooltip exclusively with these methods, setting the `imperativeModeOnly` prop to disable default behavior is recommended. Otherwise, you might face undesired behavior.
9191

9292
:::
9393

94-
- `open()` opens the tooltip programatically. All of the arguments are optional
95-
- `anchorSelect` overrides the selector currently in use. Ideally, it should match only one element (e.g. `#some-element`)
96-
- `position` overrides the tooltip position. Behaves the same as the `position` tooltip prop
97-
- `place` overrides the tooltip placement relative to the anchor. Behaves the same as the `place` tooltip prop
98-
- `content` overrides the tooltip content
94+
- `open()` opens the tooltip programmatically. All arguments are optional
95+
- `anchorSelect` overrides the current selector. Ideally, it should match only one element (e.g. `#my-element`)
96+
- `position` overrides the `position` tooltip prop
97+
- `place` overrides the `place` tooltip prop
98+
- `content` overrides the tooltip content, whether it was set through `content`, `render`, or any other way
9999
- `delay` indicates how long (in ms) before the tooltip actually opens
100-
- `close()` closes the tooltip programatically
100+
- `close()` closes the tooltip programmatically
101101
- `delay` indicates how long (in ms) before the tooltip actually closes
102102

103103
#### Internal state

0 commit comments

Comments
 (0)