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

layout in progress

parent 03d9cb6e
No related branches found
No related tags found
1 merge request!391Matching question
...@@ -70,7 +70,7 @@ const Editors = () => { ...@@ -70,7 +70,7 @@ const Editors = () => {
case 'ncbi': case 'ncbi':
return <NCBI />; return <NCBI />;
default: default:
return <Editoria />; return <HHMI />;
} }
}; };
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])], PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])],
services: [ services: [
new EnterService(), // new EnterService(),
new MatchingService(), new MatchingService(),
new MatchingToolGroupService(), new MatchingToolGroupService(),
new FillTheGapQuestionService(), new FillTheGapQuestionService(),
......
/* eslint-disable react/prop-types */ /* eslint-disable react/prop-types */
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import { WaxContext } from 'wax-prosemirror-core'; import { WaxContext } from 'wax-prosemirror-core';
import { Icon } from 'wax-prosemirror-components';
import styled from 'styled-components'; import styled from 'styled-components';
import FeedbackComponent from './FeedbackComponent'; import FeedbackComponent from './FeedbackComponent';
...@@ -10,10 +11,38 @@ const MatchingContainer = styled.div` ...@@ -10,10 +11,38 @@ const MatchingContainer = styled.div`
`; `;
const MatchingWrapper = styled.div` const MatchingWrapper = styled.div`
display: flex;
flex-direction: column;
margin-bottom: ; margin-bottom: ;
margin: 0px 38px 15px 38px; margin: 0px 38px 15px 38px;
margin-top: 10px;
`;
const QuestionWrapper = styled.div`
display: flex;
flex-direction: row;
`;
const LeftArea = styled.div`
display: flex;
`;
const RightArea = styled.div`
display: flex;
`;
const CreateOptions = styled.div`
display: flex;
margin-top: 10px; margin-top: 10px;
border: 1px solid black;
`;
const ActionButton = styled.button`
border: none;
background: transparent;
cursor: pointer;
`;
const StyledIconAction = styled(Icon)`
height: 24px;
width: 24px;
`; `;
export default ({ node, view, getPos }) => { export default ({ node, view, getPos }) => {
...@@ -30,10 +59,33 @@ export default ({ node, view, getPos }) => { ...@@ -30,10 +59,33 @@ export default ({ node, view, getPos }) => {
const readOnly = !isEditable; const readOnly = !isEditable;
const addOption = () => {};
return ( return (
<MatchingWrapper> <MatchingWrapper>
<span>Matching</span> <span>Matching</span>
<MatchingContainer className="matching"> <MatchingContainer className="matching">
<QuestionWrapper>
<LeftArea>
<input type="text"></input>
{!readOnly && (
<ActionButton
onClick={() => addOption(node.attrs.id)}
type="button"
>
<StyledIconAction name="plusSquare" />
</ActionButton>
)}
</LeftArea>
<RightArea>Right</RightArea>
</QuestionWrapper>
<QuestionWrapper>
<LeftArea>
<input type="text"></input>
</LeftArea>
<RightArea>Right</RightArea>
</QuestionWrapper>
<CreateOptions>Options</CreateOptions>
{!(readOnly && !customProps.showFeedBack) && ( {!(readOnly && !customProps.showFeedBack) && (
<FeedbackComponent <FeedbackComponent
getPos={getPos} getPos={getPos}
......
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