Skip to content

Commit dd25446

Browse files
gabrieljablonskiGabriel Jablonski
authored andcommitted
docs: minor documentantion improvements
1 parent 74eaa69 commit dd25446

File tree

4 files changed

+9
-114
lines changed

4 files changed

+9
-114
lines changed

docs/docs/examples/content.mdx

Lines changed: 0 additions & 80 deletions
This file was deleted.

docs/docs/examples/delay.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ import 'react-tooltip/dist/react-tooltip.css';
4141

4242
<a
4343
id="tooltip-anchor-hide"
44-
data-tooltip-content="hover on me will keep the tooltip"
45-
data-tooltip-delay-hide={3000}
44+
data-tooltip-content="It will take me 1000ms to close"
45+
data-tooltip-delay-hide={1000}
4646
> ◕‿‿◕ </a>
4747
<Tooltip anchorId="tooltip-anchor-hide" />
4848
```
4949

5050
<div style={{ display: 'flex', columnGap: '16px', justifyContent: 'center', paddingTop: '36px' }}>
5151
<TooltipAnchor
5252
id="tooltip-anchor-hide"
53-
data-tooltip-content="hover on me will keep the tooltip"
54-
data-tooltip-delay-hide={3000}
53+
data-tooltip-content="It will take me 1000ms to close"
54+
data-tooltip-delay-hide={1000}
5555
>
5656
◕‿‿◕
5757
</TooltipAnchor>
@@ -66,17 +66,17 @@ import 'react-tooltip/dist/react-tooltip.css';
6666

6767
<a
6868
id="tooltip-anchor-show"
69-
data-tooltip-content="hover on me will keep the tooltip"
70-
data-tooltip-delay-show={3000}
69+
data-tooltip-content="It took me 1000ms to open"
70+
data-tooltip-delay-show={1000}
7171
> ◕‿‿◕ </a>
7272
<Tooltip anchorId="tooltip-anchor-show" />
7373
```
7474

7575
<div style={{ display: 'flex', columnGap: '16px', justifyContent: 'center', paddingTop: '36px' }}>
7676
<TooltipAnchor
7777
id="tooltip-anchor-show"
78-
data-tooltip-content="hover on me will keep the tooltip"
79-
data-tooltip-delay-show={3000}
78+
data-tooltip-content="It took me 1000ms to open"
79+
data-tooltip-delay-show={1000}
8080
>
8181
◕‿‿◕
8282
</TooltipAnchor>

docs/docs/examples/multiline.mdx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,6 @@ import 'react-tooltip/dist/react-tooltip.css';
4848
<Tooltip anchorId="tooltip-anchor" html="Hello<br />multiline<br />tooltip" />
4949
</div>
5050

51-
### Using `data-tooltip-content`
52-
53-
```jsx
54-
import { Tooltip } from 'react-tooltip';
55-
import 'react-tooltip/dist/react-tooltip.css';
56-
57-
<a id="tooltip-anchor-data-content" data-tooltip-content="Hello<br />multiline<br />tooltip"> ◕‿‿◕ </a>
58-
<Tooltip anchorId="tooltip-anchor-data-content" />
59-
```
60-
61-
<div style={{ display: 'flex', columnGap: '16px', justifyContent: 'center', paddingTop: '36px' }}>
62-
<TooltipAnchor
63-
id="tooltip-anchor-data-content"
64-
data-tooltip-content="Hello<br />multiline<br />tooltip"
65-
>
66-
◕‿‿◕
67-
</TooltipAnchor>
68-
<Tooltip anchorId="tooltip-anchor-data-content" />
69-
</div>
70-
7151
### Using `data-tooltip-html`
7252

7353
```jsx
@@ -84,8 +64,3 @@ import 'react-tooltip/dist/react-tooltip.css';
8464
</TooltipAnchor>
8565
<Tooltip anchorId="tooltip-anchor-html" />
8666
</div>
87-
88-
#### Observations
89-
90-
- When using `data-tooltip-content` the `<br />` works by default
91-
- When using prop `content` the `<br />` doesn't work by default, use prop `html` instead of this

docs/docs/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ import { Tooltip } from 'react-tooltip'
9898

9999
### Styling
100100

101-
If you want a styled tooltip, don't forget to add the style file `import 'react-tooltip/dist/react-tooltip.css`.
101+
If you want a styled tooltip, don't forget to add the style file `import 'react-tooltip/dist/react-tooltip.css'`.
102102

103103
Basic styling can be done by overriding the following css variables.
104104

0 commit comments

Comments
 (0)