Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jan 28, 2023
1 parent 2ca316d commit 402ec7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `Dropdown`: deprecate `position` prop, use `popoverProps` instead ([46865](https://github.com/WordPress/gutenberg/pull/46865)).
- `Button`: improve padding for buttons with icon and text. ([46764](https://github.com/WordPress/gutenberg/pull/46764)).
- `ColorPalette`: Use computed color when css variable is passed to `ColorPicker` ([47181](https://github.com/WordPress/gutenberg/pull/47181)).
- `Popover`: add `overlay` option to the `placement` prop.

### Internal

Expand All @@ -22,6 +23,7 @@
([#47384](https://github.com/WordPress/gutenberg/pull/47384)).
- `Button`: Convert to TypeScript ([#46997](https://github.com/WordPress/gutenberg/pull/46997)).
- `QueryControls`: Convert to TypeScript ([#46721](https://github.com/WordPress/gutenberg/pull/46721)).
- `Popover`: Take iframe element scaling into account.

### Bug Fix

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/popover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ const UnforwardedPopover = (
middlewareData: { arrow: arrowData },
} = useFloating( {
placement:
( normalizedPlacementFromProps === 'overlay'
normalizedPlacementFromProps === 'overlay'
? undefined
: normalizedPlacementFromProps ) || 'bottom',
: normalizedPlacementFromProps,
middleware,
whileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>
autoUpdate( referenceParam, floatingParam, updateParam, {
Expand Down
7 changes: 0 additions & 7 deletions packages/components/src/popover/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@ export type PopoverProps = {
* @default undefined
*/
variant?: 'unstyled' | 'toolbar';
/**
* Places the popover over the reference rectangle and adjusts its size to
* fit it exactly.
*
* @default false
*/
overlay?: boolean;
// Deprecated props
/**
* Prevent the popover from flipping and resizing when meeting the viewport
Expand Down

0 comments on commit 402ec7c

Please sign in to comment.