Skip to content

Commit

Permalink
Popover docs: inline -> usePortal={false} (#3277)
Browse files Browse the repository at this point in the history
I _think_ inline is outdated b/c I don't see docs on that prop above. I'm pretty sure this section means to reference `usePortal={false}` instead.
  • Loading branch information
rootulp authored and giladgray committed Jan 10, 2019
1 parent 5175bd8 commit ead1dc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/components/popover/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,12 @@ documentation.
#### Animation delays

`Popover` can be difficult to test because it uses `Portal` to inject its contents elsewhere in the
DOM (outside the usual flow); this can be simplified by using `inline` Popovers in tests.
DOM (outside the usual flow); this can be simplified by setting `usePortal={false}` in tests.
Hover interactions can also be tricky due to delays and transitions; this can be resolved by
zeroing the default hover delays.

```tsx
<Popover inline {...yourProps} hoverCloseDelay={0} hoverOpenDelay={0}>
<Popover {...yourProps} usePortal={false} hoverCloseDelay={0} hoverOpenDelay={0}>
{yourTarget}
</Popover>
```
Expand Down Expand Up @@ -439,7 +439,7 @@ setTimeout(() => {

#### Element refs

If `inline` rendering is not an option, `Popover` instances expose `popoverElement` and
If `usePortal={false}` rendering is not an option, `Popover` instances expose `popoverElement` and
`targetElement` refs of the actual DOM elements. Importantly, `popoverElement` points to the
`.@ns-popover` element inside the `Portal` so you can use it to easily query popover contents without
knowing precisely where they are in the DOM. These properties exist primarily to simplify testing;
Expand Down

1 comment on commit ead1dc5

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Popover docs: inline -> usePortal={false} (#3277)

Previews: documentation | landing | table

Please sign in to comment.