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

hide based on states

parent aee7f20f
No related branches found
No related tags found
1 merge request!475Essay question
...@@ -19,8 +19,8 @@ const EditorWrapper = styled.div` ...@@ -19,8 +19,8 @@ const EditorWrapper = styled.div`
display: flex; display: flex;
flex: 2 1 auto; flex: 2 1 auto;
justify-content: left; justify-content: left;
opacity: ${props => (props.editable ? 1 : 0.4)}; display: ${props =>
cursor: ${props => (props.editable ? 'default' : 'not-allowed')}; props.testMode || props.showFeedBack ? 'block' : 'none'};
.ProseMirror { .ProseMirror {
white-space: break-spaces; white-space: break-spaces;
...@@ -57,7 +57,7 @@ const EssayAnswerComponent = ({ node, view, getPos }) => { ...@@ -57,7 +57,7 @@ const EssayAnswerComponent = ({ node, view, getPos }) => {
const customProps = main.props.customValues; const customProps = main.props.customValues;
const { testMode } = customProps; const { testMode, showFeedBack } = customProps;
let finalPlugins = []; let finalPlugins = [];
...@@ -191,7 +191,7 @@ const EssayAnswerComponent = ({ node, view, getPos }) => { ...@@ -191,7 +191,7 @@ const EssayAnswerComponent = ({ node, view, getPos }) => {
}; };
return ( return (
<EditorWrapper editable={testMode}> <EditorWrapper testMode={testMode} showFeedBack={showFeedBack}>
<div ref={editorRef} /> <div ref={editorRef} />
</EditorWrapper> </EditorWrapper>
); );
......
...@@ -114,7 +114,7 @@ const EssayPromptComponent = ({ node, view, getPos }) => { ...@@ -114,7 +114,7 @@ const EssayPromptComponent = ({ node, view, getPos }) => {
}; };
finalPlugins = finalPlugins.concat([ finalPlugins = finalPlugins.concat([
createPlaceholder('Type your essay sample answer'), createPlaceholder('Provide response summary and rubric'),
...plugins, ...plugins,
]); ]);
......
...@@ -109,7 +109,7 @@ const EssayQuestionComponent = ({ node, view, getPos }) => { ...@@ -109,7 +109,7 @@ const EssayQuestionComponent = ({ node, view, getPos }) => {
}; };
finalPlugins = finalPlugins.concat([ finalPlugins = finalPlugins.concat([
createPlaceholder('Type your essay'), createPlaceholder('Type your essay question'),
...plugins, ...plugins,
]); ]);
......
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