new design

This commit is contained in:
GotPPay
2017-12-01 11:03:48 +01:00
parent 4f36fc7738
commit 0e193fa5a8
14 changed files with 3827 additions and 76 deletions

View File

@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import {Button} from 'react-md';
import '../css/Intent.css'
class IntentItem extends Component {
@@ -10,10 +11,21 @@ class IntentItem extends Component {
}
render() {
return (
<div className={false ? 'IntentItem-selected' : 'IntentItem'} onClick={()=>{this.state.onClick(this.state.intent)}}>
/*
<div className={this.props.selectedIndex===this.state.index ? 'IntentItem-selected' : 'IntentItem'} onClick={()=>{this.state.onClick(this.state.intent,this.state.index)}}>
<Button className={"IntentItem"} flat swapTheming>OK</Button>
<p> {this.state.index+1}. {this.state.intent.questions[0]} </p>
</div>
*/
return (
<div>
<Button className={this.props.selectedIndex===this.state.index ? 'IntentItem-selected' : 'IntentItem'}
onClick={()=>{this.state.onClick(this.state.intent,this.state.index)}}
flat>
{this.state.index+1}. {this.state.intent.questions[0]}
</Button>
<br></br>
</div>
);
}
}