Break out menu into its own component

This commit is contained in:
Alex Liebowitz 2016-03-27 01:50:27 -04:00
parent d6a432fe75
commit 2f8e5873f4

View file

@ -118,14 +118,6 @@ var topBarStyle = {
'float': 'right'
};
var menuStyle = {
position: 'relative',
top: '3px',
marginLeft: '2px'
}, menuItemStyle = {
marginLeft: '3px'
};
var TopBar = React.createClass({
getInitialState: function() {
return {
@ -146,14 +138,30 @@ var TopBar = React.createClass({
<span style={balanceStyle}>
<CreditAmount amount={this.state.balance}/>
</span>
<span className='menu' style={menuStyle}>
<Link href='#' icon="icon-gear" fadeIn={true} style={menuItemStyle} />
</span>
<Menu />
</span>
);
}
});
var menuStyle = {
position: 'relative',
top: '3px',
marginLeft: '2px'
}, menuItemStyle = {
marginLeft: '3px'
};
var Menu = React.createClass({
render: function() {
return (
<span className='menu' style={menuStyle}>
<Link href='#' icon="icon-gear" fadeIn={true} style={menuItemStyle} />
</span>
)
}
});
//component/discover.js