frontend code refactoring
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import {Button} from 'react-md';
|
||||
import IntentItem from './IntentItem';
|
||||
import '../css/Intent.css'
|
||||
import '../css/components/IntentList.css';
|
||||
import {
|
||||
LAUNCH_REQUEST_SELECTED_INDEX,
|
||||
CONTACT_SELECTED_INDEX} from '../config/constants'
|
||||
@@ -20,11 +20,11 @@ class IntentList extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="IntentList">
|
||||
<Button className={this.props.selectedIndex===LAUNCH_REQUEST_SELECTED_INDEX ? "LaunchRequest-selected" : "LaunchRequest"} flat primary
|
||||
<Button className={this.props.selectedIndex===LAUNCH_REQUEST_SELECTED_INDEX ? "LaunchRequestButton-selected" : "LaunchRequestButton"} flat primary
|
||||
onClick={this.props.onLaunchRequestClick}
|
||||
disabled={this.props.waiting} >Launch request</Button>
|
||||
|
||||
<Button className={this.props.selectedIndex===CONTACT_SELECTED_INDEX ? "Contact-selected" : "Contact"} flat primary
|
||||
<Button className={this.props.selectedIndex===CONTACT_SELECTED_INDEX ? "ContactButton-selected" : "ContactButton"} flat primary
|
||||
onClick={this.props.onContactClick}
|
||||
disabled={this.props.waiting} >Contact</Button>
|
||||
|
||||
@@ -43,7 +43,7 @@ class IntentList extends Component {
|
||||
})
|
||||
}
|
||||
<br></br>
|
||||
<Button className={"AddIntent"} flat primary swapTheming
|
||||
<Button className="AddIntent" flat primary swapTheming
|
||||
onClick={this.props.onAddIntentClick}
|
||||
disabled={this.props.waiting}>Add intent</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user