@pie-element/rubric 4.1.6-next.13 → 4.1.6-next.25

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/src/main.jsx CHANGED
@@ -5,7 +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/pie-toolbox/render-ui';
8
+ import { color, UiLayout } from '@pie-lib/pie-toolbox/render-ui';
9
9
  import PropTypes from 'prop-types';
10
10
 
11
11
  export const RubricType = PropTypes.shape({
@@ -29,6 +29,7 @@ class Rubric extends React.Component {
29
29
 
30
30
  static propTypes = {
31
31
  classes: PropTypes.object.isRequired,
32
+ model: PropTypes.object.isRequired,
32
33
  animationsDisabled: PropTypes.bool,
33
34
  value: RubricType,
34
35
  };
@@ -47,11 +48,12 @@ class Rubric extends React.Component {
47
48
  };
48
49
 
49
50
  render() {
50
- const { value, classes } = this.props;
51
+ const { model, value, classes } = this.props;
51
52
  let { animationsDisabled } = this.props;
52
53
  animationsDisabled = animationsDisabled || value.animationsDisabled;
53
54
 
54
55
  if (value && value.points) {
56
+ const { extraCSSRules } = model || {};
55
57
  const { points, sampleAnswers } = value;
56
58
 
57
59
  const rubricList = (
@@ -98,7 +100,7 @@ class Rubric extends React.Component {
98
100
  );
99
101
 
100
102
  return (
101
- <div className={classes.root}>
103
+ <UiLayout extraCSSRules={extraCSSRules} className={classes.root}>
102
104
  {!animationsDisabled ? (
103
105
  <React.Fragment>
104
106
  <Link href={this.dudUrl} onClick={this.toggleRubric}>
@@ -111,7 +113,7 @@ class Rubric extends React.Component {
111
113
  ) : (
112
114
  rubricList
113
115
  )}
114
- </div>
116
+ </UiLayout>
115
117
  );
116
118
  } else {
117
119
  return null;