From 1803ff0171944352c119cb63d6b463a6ff60c98d Mon Sep 17 00:00:00 2001 From: CAndresH Date: Mon, 13 Apr 2020 14:17:22 -0500 Subject: [PATCH] Should apply level hierarchy #64 --- .../components/course/items/TextItem.js | 36 ++++++++++++++++--- .../components/student/items/TextItem.js | 35 ++++++++++++++---- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/SELI-Platform/imports/components/course/items/TextItem.js b/SELI-Platform/imports/components/course/items/TextItem.js index e1b2c4cb..42e44cfc 100644 --- a/SELI-Platform/imports/components/course/items/TextItem.js +++ b/SELI-Platform/imports/components/course/items/TextItem.js @@ -3,6 +3,7 @@ import MenuItem from './MenuItem'; import Code from '../../tools/Code'; import DragItem from './DragItem' import Divider from '@material-ui/core/Divider'; + export default class TextItem extends React.Component { constructor(props) { super(props); @@ -19,13 +20,38 @@ export default class TextItem extends React.Component { return(
+ + {console.log(" this.props.item.attributes", this.props.item.attributes)} { this.props.item.attributes.type === 'title' ? -

- {this.props.item.attributes.content} -

- : - undefined +
+ { + this.props.item.attributes.size==="1.5em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } + { + this.props.item.attributes.size==="1.15em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } + { + this.props.item.attributes.size==="0.9em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } +
+ : + undefined } { this.props.item.attributes.type === 'section' ? diff --git a/SELI-Platform/imports/components/student/items/TextItem.js b/SELI-Platform/imports/components/student/items/TextItem.js index 5ff3c720..4aef05ac 100644 --- a/SELI-Platform/imports/components/student/items/TextItem.js +++ b/SELI-Platform/imports/components/student/items/TextItem.js @@ -35,13 +35,36 @@ export default class TextItem extends React.Component {
- { + { this.props.item.attributes.type === 'title' ? -

- {this.props.item.attributes.content} -

- : - undefined +
+ { + this.props.item.attributes.size==="1.5em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } + { + this.props.item.attributes.size==="1.15em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } + { + this.props.item.attributes.size==="0.9em"? +

+ {this.props.item.attributes.content} +

+ : + undefined + } +
+ : + undefined } {