Skip to content

Commit

Permalink
docs(Tooltip): add floating menu reference (#9140)
Browse files Browse the repository at this point in the history
* docs(Tooltip): add info on `data-floating-menu-container`

* docs(OverflowMenu): fix typo
  • Loading branch information
emyarod committed Jul 8, 2021
1 parent 8ab436e commit 9343850
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ options that are available to the user, but there is a space constraint.

`OverflowMenu` uses React Portals to render the overflow menu into the DOM. To
determine where in the DOM the menu will be placed, it looks for a parent
element with the `data-floating-menu-container` attribute. If none parent with
element with the `data-floating-menu-container` attribute. If no parent with
this attribute is found, the menu will be placed on `document.body`.

## Component API
Expand Down
7 changes: 7 additions & 0 deletions packages/react/src/components/Tooltip/Tooltip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import { Props } from '@storybook/addon-docs/blocks';

## Overview

### `data-floating-menu-container`

`Tooltip` uses React Portals to render the tooltip into the DOM. To determine
where in the DOM the menu will be placed, it looks for a parent element with the
`data-floating-menu-container` attribute. If no parent with this attribute is
found, the menu will be placed on `document.body`.

## Component API

Please note that in addition to the props below, `Tooltip` also has two
Expand Down

0 comments on commit 9343850

Please sign in to comment.