css fix ; url fix
This commit is contained in:
@@ -8,36 +8,22 @@ export default class Welcome extends React.Component {
|
||||
|
||||
this.state = {
|
||||
type: AD_TYPE_SALE,
|
||||
buyButtonImg: 'static/images/sale_1_mobile.png',
|
||||
rentButtonImg: 'static/images/rent_0_mobile.png'
|
||||
}
|
||||
}
|
||||
|
||||
onSaleClick () {
|
||||
this.setState({
|
||||
type: AD_TYPE_SALE,
|
||||
buyButtonImg: 'static/images/sale_1_mobile.png',
|
||||
rentButtonImg: 'static/images/rent_0_mobile.png'
|
||||
})
|
||||
}
|
||||
|
||||
onRentClick () {
|
||||
this.setState({
|
||||
type: AD_TYPE_RENT,
|
||||
buyButtonImg: 'static/images/sale_0_mobile.png',
|
||||
rentButtonImg: 'static/images/rent_1_mobile.png'
|
||||
})
|
||||
}
|
||||
|
||||
onSearchClick () {
|
||||
|
||||
}
|
||||
|
||||
render () {
|
||||
let style1 = {
|
||||
background:'url(' + this.state.buyButtonImg + ')',
|
||||
backgrounSize: 'cover'
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<div className='welcome-container-bg'>
|
||||
@@ -48,8 +34,8 @@ export default class Welcome extends React.Component {
|
||||
<h1>KIVI</h1>
|
||||
<h2>Pronađi svoj novi dom!</h2>
|
||||
<div>
|
||||
<button className='buy-button' style={{background:"url("+this.state.buyButtonImg+") no-repeat"}} onClick={this.onSaleClick.bind(this)}></button>
|
||||
<button className='rent-button' style={{background:"url("+this.state.rentButtonImg+") no-repeat"}} onClick={this.onRentClick.bind(this)}></button>
|
||||
<button className={this.state.type===AD_TYPE_SALE?'buy-button-active':'buy-button-inactive'} onClick={this.onSaleClick.bind(this)}></button>
|
||||
<button className={this.state.type===AD_TYPE_RENT?'rent-button-active':'rent-button-inactive'} onClick={this.onRentClick.bind(this)}></button>
|
||||
</div>
|
||||
<button className='search-button' onClick={()=>this.props.onSearch({adType: this.state.type})} >TRAŽI</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user