-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3988 from digabi/feature/editable-grading-instruc…
…tions-misc Feature/editable grading instructions misc
- Loading branch information
Showing
6 changed files
with
28 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 6 additions & 11 deletions
17
packages/core/src/components/grading-instructions/ExamGradingInstruction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
import React, { useContext } from 'react' | ||
import React from 'react' | ||
import { ExamComponentProps } from '../../createRenderChildNodes' | ||
import { GradingInstructionContext } from '../context/GradingInstructionContext' | ||
import EditableGradingInstruction from './EditableGradingInstruction' | ||
|
||
const ExamGradingInstruction: React.FunctionComponent<ExamComponentProps> = ({ element, renderChildNodes }) => { | ||
const { editable } = useContext(GradingInstructionContext) | ||
const ExamGradingInstruction: React.FunctionComponent<ExamComponentProps> = ({ element, renderChildNodes }) => ( | ||
<div className="e-exam-grading-instruction notification e-pad-4" data-annotation-anchor="exam-grading-instruction"> | ||
{renderChildNodes(element)} | ||
</div> | ||
) | ||
|
||
return ( | ||
<div className="e-exam-grading-instruction notification e-pad-4" data-annotation-anchor="exam-grading-instruction"> | ||
{editable ? <EditableGradingInstruction element={element} /> : renderChildNodes(element)} | ||
</div> | ||
) | ||
} | ||
export default ExamGradingInstruction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,6 @@ | |
} | ||
} | ||
|
||
.ProseMirror-focused { | ||
padding: 3px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters