@pie-element/rubric 2.6.4-next.41 → 2.6.4-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/package.json +2 -2
- package/lib/main.js +17 -2
- package/lib/main.js.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +1672 -1436
- package/src/main.jsx +21 -4
package/src/main.jsx
CHANGED
|
@@ -5,6 +5,7 @@ import List from '@material-ui/core/List';
|
|
|
5
5
|
import ListItemText from '@material-ui/core/ListItemText';
|
|
6
6
|
import Link from '@material-ui/core/Link';
|
|
7
7
|
import Collapse from '@material-ui/core/Collapse';
|
|
8
|
+
import { color } from '@pie-lib/render-ui';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
10
11
|
export const RubricType = PropTypes.shape({
|
|
@@ -63,18 +64,27 @@ class Rubric extends React.Component {
|
|
|
63
64
|
<ListItem key={`P${index}`}>
|
|
64
65
|
<ListItemText
|
|
65
66
|
className={classes.rubricCol}
|
|
66
|
-
primary={index === 1 ? `${index} PT` : `${index} PTS`}
|
|
67
|
+
primary={<div className={classes.text}>{index === 1 ? `${index} PT` : `${index} PTS`}</div>}
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<ListItemText
|
|
71
|
+
primary={<div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />}
|
|
67
72
|
/>
|
|
68
|
-
<ListItemText primary={<div dangerouslySetInnerHTML={{ __html: desc }} />} />
|
|
69
73
|
</ListItem>
|
|
74
|
+
|
|
70
75
|
{sampleAnswers && sampleAnswers[index] && (
|
|
71
76
|
<ListItem key={`S${index}`}>
|
|
72
77
|
<ListItemText
|
|
73
78
|
className={classes.rubricCol}
|
|
74
79
|
style={{ marginLeft: '20px' }}
|
|
75
|
-
primary={
|
|
80
|
+
primary={<div className={classes.text}>Sample Answer</div>}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<ListItemText
|
|
84
|
+
primary={
|
|
85
|
+
<div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />
|
|
86
|
+
}
|
|
76
87
|
/>
|
|
77
|
-
<ListItemText primary={<div dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />} />
|
|
78
88
|
</ListItem>
|
|
79
89
|
)}
|
|
80
90
|
</React.Fragment>
|
|
@@ -107,10 +117,17 @@ class Rubric extends React.Component {
|
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
const styles = () => ({
|
|
120
|
+
root: {
|
|
121
|
+
color: color.text(),
|
|
122
|
+
backgroundColor: color.background(),
|
|
123
|
+
},
|
|
110
124
|
rubricCol: {
|
|
111
125
|
flex: '0 1 auto',
|
|
112
126
|
minWidth: 'fit-content',
|
|
113
127
|
},
|
|
128
|
+
text: {
|
|
129
|
+
color: color.text(),
|
|
130
|
+
},
|
|
114
131
|
});
|
|
115
132
|
|
|
116
133
|
export default withStyles(styles)(Rubric);
|