fix: modal and App viewer header overlap (#15093)
* modal positions calculations on App View mode * using css variables to compute modal offsets
This commit is contained in:
parent
2bcc630435
commit
4dc3ed481c
|
|
@ -58,6 +58,7 @@ const AppViewerBody = styled.section<{
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
height: calc(100vh - ${({ headerHeight }) => headerHeight}px);
|
height: calc(100vh - ${({ headerHeight }) => headerHeight}px);
|
||||||
|
--view-mode-header-height: ${({ headerHeight }) => headerHeight}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ContainerWithComments = styled.div`
|
const ContainerWithComments = styled.div`
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,13 @@ const Container = styled.div<{
|
||||||
z-index: ${(props) => props.zIndex || 2 - 1};
|
z-index: ${(props) => props.zIndex || 2 - 1};
|
||||||
}
|
}
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: var(--view-mode-header-height, 0);
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 100vh;
|
height: ${(props) =>
|
||||||
|
props.isEditMode
|
||||||
|
? "100vh"
|
||||||
|
: `calc(100vh - var(--view-mode-header-height, 0))`};
|
||||||
z-index: ${(props) => props.zIndex};
|
z-index: ${(props) => props.zIndex};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -66,7 +69,7 @@ const Container = styled.div<{
|
||||||
|
|
||||||
return `95%`;
|
return `95%`;
|
||||||
}};
|
}};
|
||||||
max-height: 85%;
|
max-height: ${(props) => (props.isEditMode ? "85%" : "95%")};
|
||||||
width: ${(props) => (props.width ? `${props.width}px` : "auto")};
|
width: ${(props) => (props.width ? `${props.width}px` : "auto")};
|
||||||
height: ${(props) => (props.height ? `${props.height}px` : "auto")};
|
height: ${(props) => (props.height ? `${props.height}px` : "auto")};
|
||||||
min-height: ${(props) => `${props.minSize}px`};
|
min-height: ${(props) => `${props.minSize}px`};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user