stage 3
This commit is contained in:
21
web/src/components/IntentItem.js
Normal file
21
web/src/components/IntentItem.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component } from 'react';
|
||||
import '../css/Intent.css'
|
||||
|
||||
class IntentItem extends Component {
|
||||
|
||||
constructor(props){
|
||||
super(props);
|
||||
|
||||
this.state={intent: props.intent, index: props.index, onClick: props.onClick};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={false ? 'IntentItem-selected' : 'IntentItem'} onClick={()=>{this.state.onClick(this.state.intent)}}>
|
||||
<p> {this.state.index+1}. {this.state.intent.questions[0]} </p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default IntentItem;
|
||||
Reference in New Issue
Block a user