From 5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 14 Jul 2016 23:01:34 +0200
Subject: change way to edit

---
 web/src/js/components/common/Button.jsx | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'web/src/js/components/common/Button.jsx')

diff --git a/web/src/js/components/common/Button.jsx b/web/src/js/components/common/Button.jsx
index 221c6ace..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,11 +11,8 @@ export default function Button({ onClick, text, icon, disabled }) {
         <div className={"btn btn-default"}
              onClick={onClick}
              disabled={disabled}>
-            <span hidden={!icon}>
-                <i className={"fa fa-fw " + icon}/>
-                &nbsp;
-            </span>
-            {text}
+            {icon && (<i className={"fa fa-fw " + icon}/> )}
+            {text && text}
         </div>
     )
 }
-- 
cgit v1.2.3

