From fb295ae084d13858fb2d013b4a8507a4ac31ad02 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Fri, 16 Apr 2021 14:22:36 +0300 Subject: [PATCH] fix styles --- editors/demo/src/Editors.js | 10 ++++++++-- editors/demo/src/HHMI/HHMI.js | 1 - .../MultipleChoiceQuestionService.js | 7 ++----- editors/demo/src/HHMI/layout/HhmiLayout.js | 12 +++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/editors/demo/src/Editors.js b/editors/demo/src/Editors.js index 774b1d788..fa52e3550 100644 --- a/editors/demo/src/Editors.js +++ b/editors/demo/src/Editors.js @@ -18,7 +18,13 @@ const GlobalStyle = createGlobalStyle` } `; +const ProjectContainer = styled.div` + display: flex; + height: calc(100% - 55px); +`; + const ChooseProject = styled.div` + background: #fff; display: flex; flex-direction: row; align-items: center; @@ -48,7 +54,7 @@ const Editors = () => { case 'ncbi': break; default: - return <HHMI />; + return <Editoria />; } }; @@ -65,7 +71,7 @@ const Editors = () => { {/* <ProjectButton onClick={() => setProject('ncbi')}>NCBI</ProjectButton> */} </Projects> </ChooseProject> - {displayProject()} + <ProjectContainer>{displayProject()}</ProjectContainer> </> ); }; diff --git a/editors/demo/src/HHMI/HHMI.js b/editors/demo/src/HHMI/HHMI.js index ad2847a94..f27876520 100644 --- a/editors/demo/src/HHMI/HHMI.js +++ b/editors/demo/src/HHMI/HHMI.js @@ -4,7 +4,6 @@ import { Wax } from 'wax-prosemirror-core'; import { HhmiLayout } from './layout'; import { config } from './config'; -import TestComponent from './MultipleChoiceQuestionService/components/TestComponent'; const renderImage = file => { const reader = new FileReader(); diff --git a/editors/demo/src/HHMI/MultipleChoiceQuestionService/MultipleChoiceQuestionService.js b/editors/demo/src/HHMI/MultipleChoiceQuestionService/MultipleChoiceQuestionService.js index 54cc4a9cd..b35c6765c 100644 --- a/editors/demo/src/HHMI/MultipleChoiceQuestionService/MultipleChoiceQuestionService.js +++ b/editors/demo/src/HHMI/MultipleChoiceQuestionService/MultipleChoiceQuestionService.js @@ -1,13 +1,10 @@ import { Service } from 'wax-prosemirror-services'; -// import { MultipleChoicePlugin } from 'wax-prosemirror-plugins'; import MultipleChoiceQuestion from './MultipleChoiceQuestion'; import multipleChoiceNode from './schema/multipleChoiceNode'; import TestComponent from './components/TestComponent'; class MultipleChoiceQuestionService extends Service { - boot() { - - } + boot() {} register() { this.container.bind('MultipleChoiceQuestion').to(MultipleChoiceQuestion); @@ -17,7 +14,7 @@ class MultipleChoiceQuestionService extends Service { }); const addPortal = this.container.get('AddPortal'); - addPortal({name: 'multiple_choice', component: TestComponent}) + addPortal({ name: 'multiple_choice', component: TestComponent }); } } diff --git a/editors/demo/src/HHMI/layout/HhmiLayout.js b/editors/demo/src/HHMI/layout/HhmiLayout.js index 59f37955b..3b411ae48 100644 --- a/editors/demo/src/HHMI/layout/HhmiLayout.js +++ b/editors/demo/src/HHMI/layout/HhmiLayout.js @@ -35,7 +35,7 @@ const TopMenu = styled.div` border-bottom: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')}; border-top: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')}; display: flex; - min-height: 40px; + height: 40px; user-select: none; > div:not(:last-child) { @@ -66,7 +66,8 @@ const WaxSurfaceScroll = styled.div` display: flex; height: 100%; overflow-y: auto; - position: absolute; + position: fixed; + top: 95px; width: 100%; /* PM styles for main content*/ ${EditorElements}; @@ -74,11 +75,10 @@ const WaxSurfaceScroll = styled.div` const EditorContainer = styled.div` height: 100%; - width: 65%; + width: 100%; .ProseMirror { - box-shadow: 0 0 8px #ecedf1; - min-height: 98%; + height: 100%; padding: ${grid(10)}; } `; @@ -111,7 +111,6 @@ const HhmiLayout = ({ editor }) => { <TopMenu> <MainMenuToolBar /> </TopMenu> - <Main> <EditorArea> <WaxSurfaceScroll> @@ -119,7 +118,6 @@ const HhmiLayout = ({ editor }) => { </WaxSurfaceScroll> </EditorArea> </Main> - WaxOverlays <WaxOverlays /> </Wrapper> </ThemeProvider> -- GitLab