23 lines
577 B
JavaScript
23 lines
577 B
JavaScript
import React, { Component } from 'react';
|
|
|
|
class MenuButton extends Component {
|
|
render() {
|
|
if (this.props.childOrderReverse) {
|
|
return (
|
|
<button>
|
|
<span>{this.props.label}</span>
|
|
<img src={this.props.icon}/>
|
|
</button>
|
|
);
|
|
} else {
|
|
return (
|
|
<button>
|
|
<img src={this.props.icon}/>
|
|
<span>{this.props.label}</span>
|
|
</button>
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
export default MenuButton; |