diff --git a/js/component/common.js b/js/component/common.js
index 536e48871..dd8b818d4 100644
--- a/js/component/common.js
+++ b/js/component/common.js
@@ -3,9 +3,10 @@
var Icon = React.createClass({
propTypes: {
style: React.PropTypes.object,
+ fixed: React.PropTypes.boolean,
},
render: function() {
- var className = 'icon ' + this.props.icon;
+ var className = 'icon ' + ('fixed' in this.props ? 'icon-fixed-width ' : '') + this.props.icon;
return
}
});
@@ -27,6 +28,53 @@ var Link = React.createClass({
}
});
+// Generic menu styles
+var menuStyle = {
+ border: '1px solid #aaa',
+ padding: '2px',
+ whiteSpace: 'nowrap',
+};
+
+var Menu = React.createClass({
+ render: function() {
+ return (
+
+ {this.props.children}
+
+ );
+ }
+});
+
+var menuItemStyle = {
+ display: 'block',
+};
+var MenuItem = React.createClass({
+ propTypes: {
+ href: React.PropTypes.string,
+ label: React.PropTypes.string,
+ icon: React.PropTypes.string,
+ onClick: React.PropTypes.function,
+ },
+ getDefaultProps: function() {
+ return {
+ iconPosition: 'left',
+ }
+ },
+ render: function() {
+ var icon = (this.props.icon ? : null);
+
+ return (
+
+ {this.props.iconPosition == 'left' ? icon : null}
+ {this.props.label}
+ {this.props.iconPosition == 'left' ? null : icon}
+
+ );
+ }
+});
+
+
var creditAmountStyle = {
color: '#216C2A',
fontWeight: 'bold',
diff --git a/js/page/home.js b/js/page/home.js
index c32f66da0..d3245653e 100644
--- a/js/page/home.js
+++ b/js/page/home.js
@@ -234,21 +234,12 @@ var topBarStyle = {
},
balanceStyle = {
'marginRight': '5px'
-},
-closeIconStyle = {
- 'color': '#ff5155'
};
-
var mainMenuStyle = {
position: 'absolute',
- whiteSpace: 'nowrap',
- border: '1px solid #aaa',
- padding: '2px',
top: '26px',
right: '0px',
-}, mainMenuItemStyle = {
- display: 'block',
};
var MainMenu = React.createClass({
@@ -264,12 +255,13 @@ var MainMenu = React.createClass({
var isLinux = /linux/i.test(navigator.userAgent); // @TODO: find a way to use getVersionInfo() here without messy state management
return (
-
-
-
- {isLinux ?
- : null}
+
);
}