Skip to content

Commit

Permalink
[Fix #3] Implement icons in type question answer
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Nov 24, 2021
1 parent 84a653b commit 4cdba40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/TypeQuestionAnswer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,16 @@ export default class TypeQuestionAnswer extends React.Component {
}

render() {
const question = this.props.question;
const options = this.context.options;
const onCommentChange = this.props.onCommentChange;

if (this.props.isInSectionHeader) {
return (
<div className="type-answer-group">
{this._renderLabel()}
{this._renderSelect()}
{Question.renderIcons(question, options, onCommentChange)}
</div>
);
}
Expand All @@ -363,6 +367,7 @@ export default class TypeQuestionAnswer extends React.Component {
<FormGroup>
{this._renderLabel()}
{this._renderSelect()}
{Question.renderIcons(question, options, onCommentChange)}
</FormGroup>
);
}
Expand All @@ -376,6 +381,7 @@ TypeQuestionAnswer.propTypes = {
answer: PropTypes.object.isRequired,
question: PropTypes.object.isRequired,
onChange: PropTypes.func.isRequired,
onCommentChange: PropTypes.func.isRequired,
onSubChange: PropTypes.func.isRequired,
isInSectionHeader: PropTypes.bool
}

0 comments on commit 4cdba40

Please sign in to comment.