Add TopMenu component and page specific content
This commit is contained in:
23
src/components/MenuButton.js
Normal file
23
src/components/MenuButton.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
class MenuButton extends Component {
|
||||
render(label, icon, childOrderReverse) {
|
||||
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;
|
Reference in New Issue
Block a user