diff options
| author | Clemens <cle1000.cb@gmail.com> | 2016-07-14 23:01:34 +0200 | 
|---|---|---|
| committer | Clemens <cle1000.cb@gmail.com> | 2016-07-14 23:01:34 +0200 | 
| commit | 5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56 (patch) | |
| tree | 8858b5b6ccbfe15236eb99de7d2bd731f1717a22 /web/src/js/components/common/Button.jsx | |
| parent | 45349b3597f53ee08207b20eb8bff9dfc9166aa8 (diff) | |
| download | mitmproxy-5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56.tar.gz mitmproxy-5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56.tar.bz2 mitmproxy-5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56.zip  | |
change way to edit
Diffstat (limited to 'web/src/js/components/common/Button.jsx')
| -rw-r--r-- | web/src/js/components/common/Button.jsx | 10 | 
1 files changed, 4 insertions, 6 deletions
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}/> -                  -            </span> -            {text} +            {icon && (<i className={"fa fa-fw " + icon}/> )} +            {text && text}          </div>      )  }  | 
