Skip to content

Commit

Permalink
Allow anchor to be null
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Sep 9, 2022
1 parent 31fe826 commit 43837fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/popover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ render(

The component accepts the following props. Props not included in this set will be applied to the element wrapping Popover content.

### `anchor`: `Element | VirtualElement`
### `anchor`: `Element | VirtualElement | null`

The element that should be used by the `Popover` as its anchor. It can either be an `Element` or, alternatively, a `VirtualElement` — ie. an object with the `getBoundingClientRect()` and the `ownerDocument` properties defined.

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/popover/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type PopoverProps = {
* be an `Element` or, alternatively, a `VirtualElement` — ie. an object with
* the `getBoundingClientRect()` and the `ownerDocument` properties defined.
*/
anchor?: Element | VirtualElement;
anchor?: Element | VirtualElement | null;
/**
* Whether the popover should animate when opening.
*
Expand Down

0 comments on commit 43837fb

Please sign in to comment.