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

fix styles

parent 74575498
No related branches found
No related tags found
1 merge request!289Pm node views portals
...@@ -18,7 +18,13 @@ const GlobalStyle = createGlobalStyle` ...@@ -18,7 +18,13 @@ const GlobalStyle = createGlobalStyle`
} }
`; `;
const ProjectContainer = styled.div`
display: flex;
height: calc(100% - 55px);
`;
const ChooseProject = styled.div` const ChooseProject = styled.div`
background: #fff;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -48,7 +54,7 @@ const Editors = () => { ...@@ -48,7 +54,7 @@ const Editors = () => {
case 'ncbi': case 'ncbi':
break; break;
default: default:
return <HHMI />; return <Editoria />;
} }
}; };
...@@ -65,7 +71,7 @@ const Editors = () => { ...@@ -65,7 +71,7 @@ const Editors = () => {
{/* <ProjectButton onClick={() => setProject('ncbi')}>NCBI</ProjectButton> */} {/* <ProjectButton onClick={() => setProject('ncbi')}>NCBI</ProjectButton> */}
</Projects> </Projects>
</ChooseProject> </ChooseProject>
{displayProject()} <ProjectContainer>{displayProject()}</ProjectContainer>
</> </>
); );
}; };
......
...@@ -4,7 +4,6 @@ import { Wax } from 'wax-prosemirror-core'; ...@@ -4,7 +4,6 @@ import { Wax } from 'wax-prosemirror-core';
import { HhmiLayout } from './layout'; import { HhmiLayout } from './layout';
import { config } from './config'; import { config } from './config';
import TestComponent from './MultipleChoiceQuestionService/components/TestComponent';
const renderImage = file => { const renderImage = file => {
const reader = new FileReader(); const reader = new FileReader();
......
import { Service } from 'wax-prosemirror-services'; import { Service } from 'wax-prosemirror-services';
// import { MultipleChoicePlugin } from 'wax-prosemirror-plugins';
import MultipleChoiceQuestion from './MultipleChoiceQuestion'; import MultipleChoiceQuestion from './MultipleChoiceQuestion';
import multipleChoiceNode from './schema/multipleChoiceNode'; import multipleChoiceNode from './schema/multipleChoiceNode';
import TestComponent from './components/TestComponent'; import TestComponent from './components/TestComponent';
class MultipleChoiceQuestionService extends Service { class MultipleChoiceQuestionService extends Service {
boot() { boot() {}
}
register() { register() {
this.container.bind('MultipleChoiceQuestion').to(MultipleChoiceQuestion); this.container.bind('MultipleChoiceQuestion').to(MultipleChoiceQuestion);
...@@ -17,7 +14,7 @@ class MultipleChoiceQuestionService extends Service { ...@@ -17,7 +14,7 @@ class MultipleChoiceQuestionService extends Service {
}); });
const addPortal = this.container.get('AddPortal'); const addPortal = this.container.get('AddPortal');
addPortal({name: 'multiple_choice', component: TestComponent}) addPortal({ name: 'multiple_choice', component: TestComponent });
} }
} }
......
...@@ -35,7 +35,7 @@ const TopMenu = styled.div` ...@@ -35,7 +35,7 @@ const TopMenu = styled.div`
border-bottom: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')}; border-bottom: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')};
border-top: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')}; border-top: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')};
display: flex; display: flex;
min-height: 40px; height: 40px;
user-select: none; user-select: none;
> div:not(:last-child) { > div:not(:last-child) {
...@@ -66,7 +66,8 @@ const WaxSurfaceScroll = styled.div` ...@@ -66,7 +66,8 @@ const WaxSurfaceScroll = styled.div`
display: flex; display: flex;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
position: absolute; position: fixed;
top: 95px;
width: 100%; width: 100%;
/* PM styles for main content*/ /* PM styles for main content*/
${EditorElements}; ${EditorElements};
...@@ -74,11 +75,10 @@ const WaxSurfaceScroll = styled.div` ...@@ -74,11 +75,10 @@ const WaxSurfaceScroll = styled.div`
const EditorContainer = styled.div` const EditorContainer = styled.div`
height: 100%; height: 100%;
width: 65%; width: 100%;
.ProseMirror { .ProseMirror {
box-shadow: 0 0 8px #ecedf1; height: 100%;
min-height: 98%;
padding: ${grid(10)}; padding: ${grid(10)};
} }
`; `;
...@@ -111,7 +111,6 @@ const HhmiLayout = ({ editor }) => { ...@@ -111,7 +111,6 @@ const HhmiLayout = ({ editor }) => {
<TopMenu> <TopMenu>
<MainMenuToolBar /> <MainMenuToolBar />
</TopMenu> </TopMenu>
<Main> <Main>
<EditorArea> <EditorArea>
<WaxSurfaceScroll> <WaxSurfaceScroll>
...@@ -119,7 +118,6 @@ const HhmiLayout = ({ editor }) => { ...@@ -119,7 +118,6 @@ const HhmiLayout = ({ editor }) => {
</WaxSurfaceScroll> </WaxSurfaceScroll>
</EditorArea> </EditorArea>
</Main> </Main>
WaxOverlays
<WaxOverlays /> <WaxOverlays />
</Wrapper> </Wrapper>
</ThemeProvider> </ThemeProvider>
......
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