Add support for dropdown container to be inline-block (#8559)#16491
Add support for dropdown container to be inline-block (#8559)#16491jffng wants to merge 1 commit into
Conversation
|
While triaging the repository I found this PR. Sorry for the delay here, we should have taken a look earlier. -- Why did you decide on a prop here? Should this be the default behavior of the Dropdown instead? |
|
Hello!
I used a prop as a convenience, giving the consumer of the component a method to handle an expected use case (display the popover aligned to the button), while not changing the default behavior.
I'm not sure - I would need to look more thoroughly throughout the repo to see where and how the Dropdown component is used, and what effects the change would have. |
|
So I went ahead and included this change in #18631 in addition to other dropdown changes. Thanks a lot for your contribution |
Description
This change adds a prop to the
Dropdowncomponent that allows a user to set the containing element to displayinline-block. This allows the popover to appear centered relative to its trigger in instances outside of the Gutenberg context.How has this been tested?
Tested in the Gutenberg playground and passes respective unit tests.
Screenshots
Before

After

Types of changes
Fixes #8559
Checklist: