Skip to content

Commit

Permalink
[DST-283]: Fix select component into small screens (#3772)
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaAbdellateef authored Feb 28, 2024
1 parent 7a5bc5f commit d6c44fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-glasses-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marigold/components": patch
---

Fix Select component in small screens
2 changes: 1 addition & 1 deletion packages/components/src/Menu/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ test('renders as tray', () => {
const item = screen.getByText('Burger');
// eslint-disable-next-line testing-library/no-node-access
expect(item.parentElement?.parentElement?.className).toMatchInlineSnapshot(
`"!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"`
`"!fixed !bottom-0 !left-0 !top-auto !max-h-fit w-full"`
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Overlay/Popover.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test('popover is small screen', () => {
const popover = screen.getByTestId('popover');

expect(popover.className).toMatchInlineSnapshot(
`"!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"`
`"!fixed !bottom-0 !left-0 !top-auto !max-h-fit w-full"`
);
expect(popover).toBeInTheDocument();
});
2 changes: 1 addition & 1 deletion packages/components/src/Overlay/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const _Popover = forwardRef<HTMLDivElement, PopoverProps>(
ref={ref}
{...props}
className={cn(
'!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col'
'!fixed !bottom-0 !left-0 !top-auto !max-h-fit w-full'
)}
UNSTABLE_portalContainer={portal as Element}
>
Expand Down

0 comments on commit d6c44fa

Please sign in to comment.