Skip to content

Commit

Permalink
homepage button fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafiz93 committed Aug 8, 2017
1 parent 8b0fbfc commit 464ceb0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
12 changes: 12 additions & 0 deletions client/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,15 @@ body{
padding-bottom: 10px;
display: inline-block;
}



/************************************ others *************************************/
.dropdownContent{
margin-bottom: 15px;
}

.actionButtonContainer .button{
margin: 20px auto 0;
display: block;
}
43 changes: 37 additions & 6 deletions imports/ui/components/SampleComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,51 @@ import React, { Component } from 'react';
export default class SampleComponent extends Component{
constructor(props){
super(props);

this.state = {
count: 0,
}
}

componentDidMount(){
// initiate something
$('.ui.dropdown').dropdown()
}

handleChange(name, e) {
let val = parseInt(e.target.value);
if(val.isNan() || val == -1) return;

let change = {}
change[name] = val
this.setState(change)
}

handleSubmit(){

}

render(){
console.log(this.state)
return(
<div className='contentContainer'>
<h3> Hello! This is your component! </h3>
<div style={{width: '350px', margin: '5vh auto 15px', borderRadius: '5px', background: '#00300d'}}>
<h3 style={{padding: '15px', borderBottom: '1px solid #ddd', textAlign: 'center', margin: 0, color: 'white'}}>Select Net Type</h3>
<div style={{padding: '20px 15px', background: '#ddd'}}>
<select className="ui fluid dropdown dropdownContent" onChange={this.handleChange.bind(this, 'radio_net')}>
<option value="-1">Select Net Type</option>
<option value="1">Army Radio Net</option>
<option value="2">Div Radio Net</option>
<option value="3">BDE Radio Net</option>
</select>
<select className="ui fluid dropdown" onChange={this.handleChange.bind(this, 'cmd_net')}>
<option value="-1">Select Command or Admin</option>
<option value="1">Command Net</option>
<option value="2">Admin Net</option>
</select>
<div className='actionButtonContainer'>
<button className='ui blue icon labeled button'>
<i className='send icon'></i>
Submit
</button>
</div>
</div>
</div>
</div>
)
}
Expand Down

0 comments on commit 464ceb0

Please sign in to comment.