Revert "fix: layer mobile widget details above header"
This reverts commit a540f07920.
This commit is contained in:
1 parent
7bedf4a13d
commit
6fc851f054
6 files changed
+2
-36
No files matched your search
@@ -1,5 +0,0 @@
|
||||
import { getDefaultZIndex } from "@mantine/core";
|
||||
|
||||
export const appShellHeaderZIndex = getDefaultZIndex("modal") + 1;
|
||||
export const modalZIndex = appShellHeaderZIndex + 1;
|
||||
export const managedModalZIndex = modalZIndex + 1;
|
||||
@@ -1,16 +0,0 @@
|
||||
import { getDefaultZIndex } from "@mantine/core";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
import { theme } from "../theme";
|
||||
import { appShellHeaderZIndex, managedModalZIndex, modalZIndex } from "./layers";
|
||||
import { modalComponent } from "./modal";
|
||||
|
||||
describe("application layers", () => {
|
||||
test("keeps dialogs above the fixed header and managed dialogs above regular dialogs", () => {
|
||||
expect(appShellHeaderZIndex).toBe(getDefaultZIndex("modal") + 1);
|
||||
expect(modalZIndex).toBe(appShellHeaderZIndex + 1);
|
||||
expect(managedModalZIndex).toBe(modalZIndex + 1);
|
||||
expect(modalComponent.defaultProps).toMatchObject({ zIndex: modalZIndex });
|
||||
expect(theme.components?.Drawer?.defaultProps).toMatchObject({ zIndex: modalZIndex });
|
||||
});
|
||||
});
|
||||
@@ -1,7 +1,5 @@
|
||||
import type { MantineTheme, MantineThemeComponent, ModalProps } from "@mantine/core";
|
||||
|
||||
import { modalZIndex } from "./layers";
|
||||
|
||||
export const modalSizeSelect = "xxl";
|
||||
export const modalSizeForm = "lg";
|
||||
|
||||
@@ -10,9 +8,6 @@ const fixedModalSizes = new Set([modalSizeSelect, modalSizeForm]);
|
||||
const modalWidth = "min(var(--modal-size), calc(100vw - 2 * var(--mantine-spacing-md)))";
|
||||
|
||||
export const modalComponent: MantineThemeComponent = {
|
||||
defaultProps: {
|
||||
zIndex: modalZIndex,
|
||||
},
|
||||
vars: (_theme: MantineTheme, props: Partial<ModalProps>) => {
|
||||
if (props.size === modalSizeSelect) {
|
||||
return { root: { "--modal-size": "75rem" } };
|
||||
|
||||
Reference in new issue
Block a user