Skip to content

Commit a3670e4

Browse files
fix(ebay-combobox): apply combobox--fluid class when fluid prop is set (#638)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 30b11ec commit a3670e4

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ebay/ui-core-react": patch
3+
---
4+
5+
fix(ebay-combobox): apply combobox--fluid class when fluid prop is set

packages/ebayui-core-react/src/ebay-combobox/__tests__/index.spec.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const renderCombobox = (props?) =>
1515
);
1616

1717
describe("<EbayCombobox />", () => {
18+
it("should apply combobox--fluid class when fluid prop is set", () => {
19+
const { container } = renderCombobox({ fluid: true });
20+
expect(container.firstChild).toHaveClass("combobox", "combobox--fluid");
21+
});
22+
1823
it("should update input value on arrow down", async () => {
1924
renderCombobox();
2025
const input = screen.getByRole("combobox");

packages/ebayui-core-react/src/ebay-combobox/combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ const EbayCombobox: FC<EbayComboboxProps> = ({
264264
};
265265

266266
return (
267-
<Container ref={containerRef} className={classNames(`combobox`, className)}>
267+
<Container ref={containerRef} className={classNames("combobox", { "combobox--fluid": fluid }, className)}>
268268
<floatingLabel.Label htmlFor={rest.id} />
269269

270270
<span

0 commit comments

Comments
 (0)