+ MobileSwipeDownModal: ({ children, requestClose, sheetStyle }: any) => (
+
@@ -204,7 +208,7 @@ describe('ResponsiveMenu', () => {
expect(screen.getByTestId('focus-trap')).toBeInTheDocument();
});
- it('applies --sheet-surface-color CSS custom property when surfaceColor is set', () => {
+ it('paints the sheet panel with surfaceColor so the sheet is coloured end to end', () => {
render(
{
);
- const box = screen.getByTestId('box');
- expect(box.style.getPropertyValue('--sheet-surface-color')).toBe('#663399');
- expect(box.className).toContain('SheetContentThemed');
+ expect(screen.getByTestId('mobile-swipe-down')).toHaveStyle({ backgroundColor: '#663399' });
});
- it('does not set surface-color properties when surfaceColor is absent', () => {
+ it('does not paint the sheet panel when surfaceColor is absent', () => {
render(
{
);
- const box = screen.getByTestId('box');
- expect(box.style.getPropertyValue('--sheet-surface-color')).toBe('');
- expect(box.className).not.toContain('SheetContentThemed');
+ expect(screen.getByTestId('mobile-swipe-down').style.backgroundColor).toBe('');
});
});
diff --git a/src/app/components/ResponsiveMenu.tsx b/src/app/components/ResponsiveMenu.tsx
index 6ec36f8d2..82ee1333f 100644
--- a/src/app/components/ResponsiveMenu.tsx
+++ b/src/app/components/ResponsiveMenu.tsx
@@ -98,11 +98,8 @@ export function ResponsiveMenu({
if (isMobile) {
const sheetStyle: CSSProperties | undefined = surfaceColor
- ? ({ '--sheet-surface-color': surfaceColor } as CSSProperties)
+ ? { backgroundColor: surfaceColor }
: undefined;
- const sheetClassName = surfaceColor
- ? `${css.SheetContent} ${css.SheetContentThemed}`
- : css.SheetContent;
return (
<>
@@ -113,7 +110,7 @@ export function ResponsiveMenu({
)}
{anchor && mobile === 'sheet' && (
-
+
{() => (
{menu}
diff --git a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
index 514ac1088..7e8ba7573 100644
--- a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
+++ b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
@@ -233,6 +233,7 @@ export const RoomPinMenu = forwardRef(