Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge incoming style prop on ComboboxOptions, ListboxOptions, MenuItems, and PopoverPanel components #3250

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Keep `<Combobox />` open when clicking scrollbar in `<ComboboxOptions>` ([#3249](https://github.com/tailwindlabs/headlessui/pull/3249))
- Merge incoming `style` prop on `ComboboxOptions`, `ListboxOptions`, `MenuItems`, and `PopoverPanel` components ([#3250](https://github.com/tailwindlabs/headlessui/pull/3250))

## [2.0.4] - 2024-05-25

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(
id,
ref: optionsRef,
style: {
...theirProps.style,
...style,
'--input-width': useElementSize(data.inputRef, true).width,
'--button-width': useElementSize(data.buttonRef, true).width,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(
role: 'listbox',
tabIndex: 0,
style: {
...theirProps.style,
...style,
'--button-width': useElementSize(data.buttonRef, true).width,
} as CSSProperties,
Expand Down
1 change: 1 addition & 0 deletions packages/@headlessui-react/src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ function ItemsFn<TTag extends ElementType = typeof DEFAULT_ITEMS_TAG>(
tabIndex: 0,
ref: itemsRef,
style: {
...theirProps.style,
...style,
'--button-width': useElementSize(state.buttonRef, true).width,
} as CSSProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ function PanelFn<TTag extends ElementType = typeof DEFAULT_PANEL_TAG>(
: undefined,
tabIndex: -1,
style: {
...theirProps.style,
...style,
'--button-width': useElementSize(state.button, true).width,
} as React.CSSProperties,
Expand Down
Loading