Skip to content

Commit

Permalink
chore: tooltip add FAQ (#2985)
Browse files Browse the repository at this point in the history
Co-authored-by: Heising <[email protected]>
  • Loading branch information
HaixingOoO and Heising authored Jul 10, 2024
1 parent cf54199 commit 71a9176
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/tooltip/tooltip.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
:: BASE_DOC ::

### 模拟原生title

{{ mouse }}

### 定时消失

{{ duration }}

## FAQ

### How to solve the problem that `Tooltip` and related floating components based on `Popup` may be offset when nested?

Currently, this can be solved by `Fragment` or other `HTML` elements

```js
<Tooltip content="Tooltip Content">
<>
{children}
</>
</Tooltip>
```

## API
### Tooltip Props

Expand Down
13 changes: 13 additions & 0 deletions src/tooltip/tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@

{{ duration }}

## FAQ

### `Tooltip` 及基于 `Popup` 的相关浮层组件,嵌套使用可能出现位置偏移的情况,如何解决?

目前暂时可通过 `Fragment` 或者其他 `HTML` 元素来解决

```js
<Tooltip content="Tooltip Content">
<>
{children}
</>
</Tooltip>
```

## API
### Tooltip Props
Expand Down

0 comments on commit 71a9176

Please sign in to comment.