aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/common/Button.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/common/Button.jsx')
-rw-r--r--web/src/js/components/common/Button.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/js/components/common/Button.jsx b/web/src/js/components/common/Button.jsx
index 574288df..cd01af22 100644
--- a/web/src/js/components/common/Button.jsx
+++ b/web/src/js/components/common/Button.jsx
@@ -2,7 +2,8 @@ import React, { PropTypes } from 'react'
Button.propTypes = {
onClick: PropTypes.func.isRequired,
- text: PropTypes.string.isRequired
+ text: PropTypes.string,
+ icon: PropTypes.string
}
export default function Button({ onClick, text, icon, disabled }) {
@@ -10,9 +11,8 @@ export default function Button({ onClick, text, icon, disabled }) {
<div className={"btn btn-default"}
onClick={onClick}
disabled={disabled}>
- <i className={"fa fa-fw " + icon}/>
- &nbsp;
- {text}
+ {icon && (<i className={"fa fa-fw " + icon}/> )}
+ {text && text}
</div>
)
}