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