diff options
author | Jason <jason.daurus@gmail.com> | 2016-06-17 07:07:38 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-06-17 07:07:38 +0800 |
commit | 7a78970d10ab2dfc9b86dd30a76fb1513f43dd35 (patch) | |
tree | 6d331d83866f6809cfad3b62a96b261c087394d4 /web/src/js/components/common/Button.jsx | |
parent | 4ce7a9ba7728e7988f4455723ba5fed4fcd8d149 (diff) | |
download | mitmproxy-7a78970d10ab2dfc9b86dd30a76fb1513f43dd35.tar.gz mitmproxy-7a78970d10ab2dfc9b86dd30a76fb1513f43dd35.tar.bz2 mitmproxy-7a78970d10ab2dfc9b86dd30a76fb1513f43dd35.zip |
[web] common
Diffstat (limited to 'web/src/js/components/common/Button.jsx')
-rw-r--r-- | web/src/js/components/common/Button.jsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/src/js/components/common/Button.jsx b/web/src/js/components/common/Button.jsx new file mode 100644 index 00000000..cc2fe9dd --- /dev/null +++ b/web/src/js/components/common/Button.jsx @@ -0,0 +1,16 @@ +import React, { PropTypes } from 'react' + +Button.propTypes = { + onClick: PropTypes.func.isRequired, + text: PropTypes.string.isRequired +} + +export default function Button({ onClick, text, icon }) { + return ( + <div className={"btn btn-default"} onClick={onClick}> + <i className={"fa fa-fw " + icon}/> + + {text} + </div> + ) +} |