Skip to content
Snippets Groups Projects
Commit e0bc0a8c authored by chris's avatar chris
Browse files

remove panelGroup

parent f1f09a3a
No related branches found
No related tags found
1 merge request!313Fill the gap
import React, { useContext } from 'react';
import styled, { css, ThemeProvider } from 'styled-components';
import PanelGroup from 'react-panelgroup';
import styled, { ThemeProvider } from 'styled-components';
import { WaxContext, ComponentPlugin } from 'wax-prosemirror-core';
import { grid, th } from '@pubsweet/ui-toolkit';
import { cokoTheme } from '../theme';
......@@ -69,7 +68,6 @@ const WaxSurfaceScroll = styled.div`
display: flex;
height: 100%;
overflow-y: auto;
position: absolute;
width: 100%;
/* PM styles for main content*/
${EditorElements};
......@@ -86,14 +84,6 @@ const EditorContainer = styled.div`
}
`;
let surfaceHeight = (window.innerHeight / 5) * 3;
let notesHeight = (window.innerHeight / 5) * 2;
const onResizeEnd = arr => {
surfaceHeight = arr[0].size;
notesHeight = arr[1].size;
};
const MainMenuToolBar = ComponentPlugin('mainMenuToolBar');
const WaxOverlays = ComponentPlugin('waxOverlays');
......@@ -125,18 +115,9 @@ const HhmiLayout = ({ editor }) => {
<Main>
<EditorArea>
<PanelGroup
direction="column"
panelWidths={[
{ size: surfaceHeight, resize: 'stretch' },
{ size: notesHeight, resize: 'resize' },
]}
onResizeEnd={onResizeEnd}
>
<WaxSurfaceScroll>
<EditorContainer>{editor}</EditorContainer>
</WaxSurfaceScroll>
</PanelGroup>
<WaxSurfaceScroll>
<EditorContainer>{editor}</EditorContainer>
</WaxSurfaceScroll>
</EditorArea>
</Main>
<WaxOverlays />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment