frontend code refactoring
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import {Button, TextField} from 'react-md';
|
||||
import '../css/Intent.css'
|
||||
import '../css/Common.css';
|
||||
import '../css/components/LaunchRequest.css';
|
||||
import { INVOCATION_NAME_MAX_LENGTH, INVOCATION_ANSWER_MAX_LENGTH } from '../config/constants';
|
||||
|
||||
class LaunchRequest extends Component {
|
||||
@@ -19,33 +20,31 @@ class LaunchRequest extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="LaunchRequestBox">
|
||||
<h5 style={{textAlign:'left', marginTop: '30px', marginLeft: '20px'}}> Invocation name customers use to activate the skill. For example "Open Saburly" or "Talk to Saburly" </h5>
|
||||
<div className="RightPanelBox">
|
||||
<h5 className="PanelSubTitle"> Invocation name customers use to activate the skill. For example "Open Saburly" or "Talk to Saburly" </h5>
|
||||
<TextField
|
||||
id="invocation name"
|
||||
lineDirection="center"
|
||||
placeholder="Saburly"
|
||||
label="Invocation name"
|
||||
className="md-cell md-cell--bottom"
|
||||
style={{width:'60%', marginLeft: '20px'}}
|
||||
className="md-cell md-cell--bottom InvocationInputBoxes"
|
||||
maxLength={INVOCATION_NAME_MAX_LENGTH}
|
||||
onChange={this.handleNameEdit}
|
||||
value={this.state.invocationName}/>
|
||||
<br></br>
|
||||
<h5 style={{textAlign:'left', marginLeft: '20px', marginTop: '30px'}}>Answer customers get from Alexa when they activate the skill.</h5>
|
||||
<h5 className="PanelSubTitle" >Answer customers get from Alexa when they activate the skill.</h5>
|
||||
<TextField
|
||||
id="invocation answer"
|
||||
lineDirection="center"
|
||||
placeholder="We are Saburly, ask us something about us"
|
||||
label="Answer"
|
||||
className="md-cell md-cell--bottom"
|
||||
style={{width:'60%', marginLeft: '20px'}}
|
||||
className="md-cell md-cell--bottom InvocationInputBoxes"
|
||||
maxLength={INVOCATION_ANSWER_MAX_LENGTH}
|
||||
onChange={this.handleAnswerEdit}
|
||||
value={this.state.invocationAnswer}/>
|
||||
<br></br>
|
||||
<br></br>
|
||||
<Button style={{float:'right', marginRight: '20px'}} flat primary swapTheming
|
||||
<Button className="SaveButton" flat primary swapTheming
|
||||
onClick={()=>{this.props.onSaveClick(this.state.invocationName, this.state.invocationAnswer)}}
|
||||
disabled={this.props.waiting}>Save</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user