aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/common
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-12-11 19:59:54 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-12-11 19:59:54 +0100
commitd1c7b203f08d4b1e1ee3c7a50762a4f08843feef (patch)
tree0e1edad4249c0a88e623abf3479a4697c2114276 /web/src/js/components/common
parent6540aedaab107a7eecf57d2275e578d97fc77335 (diff)
downloadmitmproxy-d1c7b203f08d4b1e1ee3c7a50762a4f08843feef.tar.gz
mitmproxy-d1c7b203f08d4b1e1ee3c7a50762a4f08843feef.tar.bz2
mitmproxy-d1c7b203f08d4b1e1ee3c7a50762a4f08843feef.zip
[web] style flow menu
Diffstat (limited to 'web/src/js/components/common')
-rw-r--r--web/src/js/components/common/Button.jsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/src/js/components/common/Button.jsx b/web/src/js/components/common/Button.jsx
index bfbb455d..69471f25 100644
--- a/web/src/js/components/common/Button.jsx
+++ b/web/src/js/components/common/Button.jsx
@@ -1,19 +1,21 @@
-import React, { PropTypes } from 'react'
-import classnames from 'classnames'
+import React, { PropTypes } from "react"
+import classnames from "classnames"
Button.propTypes = {
onClick: PropTypes.func.isRequired,
- text: PropTypes.string,
- icon: PropTypes.string
+ children: PropTypes.node.isRequired,
+ icon: PropTypes.string,
+ title: PropTypes.string,
}
-export default function Button({ onClick, text, icon, disabled, className }) {
+export default function Button({ onClick, children, icon, disabled, className, title }) {
return (
<div className={classnames(className, 'btn btn-default')}
onClick={onClick}
- disabled={disabled}>
+ disabled={disabled}
+ title={title}>
{icon && (<i className={"fa fa-fw " + icon}/> )}
- {text && text}
+ {children}
</div>
)
}