Skip to content

Commit 6430dcd

Browse files
committed
fix(web): fix-file-viewer-styling
1 parent f22b83a commit 6430dcd

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

web/src/components/FileViewer/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ import "@cyntler/react-doc-viewer/dist/index.css";
77
import MarkdownRenderer from "./Viewers/MarkdownViewer";
88

99
const StyledDocViewer = styled(DocViewer)`
10-
padding: 0px 8px;
1110
background-color: ${({ theme }) => theme.whiteBackground} !important;
12-
13-
#pdf-controls {
14-
z-index: 0;
15-
}
1611
`;
1712

1813
/**
@@ -32,8 +27,8 @@ const FileViewer: React.FC<{ url: string }> = ({ url }) => {
3227
disableFileName: true,
3328
},
3429
pdfZoom: {
35-
defaultZoom: 1.1, // 1 as default,
36-
zoomJump: 0.2, // 0.1 as default,
30+
defaultZoom: 0.8,
31+
zoomJump: 0.1,
3732
},
3833
pdfVerticalScrollByDefault: true, // false as default
3934
}}

web/src/layout/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TestnetBanner } from "./TestnetBanner";
99

1010
const Container = styled.div`
1111
position: sticky;
12-
z-index: 1;
12+
z-index: 10;
1313
top: 0;
1414
width: 100%;
1515
background-color: ${({ theme }) => theme.primaryPurple};

web/src/pages/Cases/AttachmentDisplay/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const DisplayContainer = styled.div`
2020
background-color: ${({ theme }) => theme.whiteBackground};
2121
border-radius: 3px;
2222
box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.06);
23-
overflow: scroll hidden;
23+
overflow: scroll;
24+
max-height: 750px;
2425
`;
2526

2627
const LoaderContainer = styled.div`

web/src/styles/global-style.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,9 @@ export const GlobalStyle = createGlobalStyle`
115115
--os-handle-bg-hover: ${({ theme }) => theme.secondaryPurple};
116116
--os-handle-bg-active: ${({ theme }) => theme.lavenderPurple};
117117
}
118+
119+
// @cyntler/react-doc-viewer injects a canvas to load pdf, this is alters the height of body tag, so set to hidden
120+
.hiddenCanvasElement{
121+
display: none;
122+
}
118123
`;

0 commit comments

Comments
 (0)