chore: Combine z-index from editor
This commit is contained in:
@@ -10,6 +10,7 @@ import insertFiles from "@shared/editor/commands/insertFiles";
|
||||
import { CommandFactory } from "@shared/editor/lib/Extension";
|
||||
import filterExcessSeparators from "@shared/editor/lib/filterExcessSeparators";
|
||||
import { EmbedDescriptor, MenuItem } from "@shared/editor/types";
|
||||
import { depths } from "@shared/styles";
|
||||
import { supportedImageMimeTypes } from "@shared/utils/files";
|
||||
import getDataTransferFiles from "@shared/utils/getDataTransferFiles";
|
||||
import { Dictionary } from "~/hooks/useDictionary";
|
||||
@@ -605,7 +606,7 @@ export const Wrapper = styled.div<{
|
||||
color: ${(props) => props.theme.text};
|
||||
font-family: ${(props) => props.theme.fontFamily};
|
||||
position: absolute;
|
||||
z-index: ${(props) => props.theme.zIndex + 100};
|
||||
z-index: ${depths.editorToolbar};
|
||||
${(props) => props.top !== undefined && `top: ${props.top}px`};
|
||||
${(props) => props.bottom !== undefined && `bottom: ${props.bottom}px`};
|
||||
left: ${(props) => props.left}px;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { EditorView } from "prosemirror-view";
|
||||
import * as React from "react";
|
||||
import { Portal } from "react-portal";
|
||||
import styled from "styled-components";
|
||||
import { depths } from "@shared/styles";
|
||||
import useComponentSize from "~/hooks/useComponentSize";
|
||||
import useMediaQuery from "~/hooks/useMediaQuery";
|
||||
import useViewportHeight from "~/hooks/useViewportHeight";
|
||||
@@ -208,7 +209,7 @@ const Wrapper = styled.div<{
|
||||
will-change: opacity, transform;
|
||||
padding: 8px 16px;
|
||||
position: absolute;
|
||||
z-index: ${(props) => props.theme.zIndex + 100};
|
||||
z-index: ${depths.editorToolbar};
|
||||
opacity: 0;
|
||||
background-color: ${(props) => props.theme.toolbarBackground};
|
||||
border-radius: 4px;
|
||||
|
||||
Reference in New Issue
Block a user