From 7a78970d10ab2dfc9b86dd30a76fb1513f43dd35 Mon Sep 17 00:00:00 2001
From: Jason <jason.daurus@gmail.com>
Date: Fri, 17 Jun 2016 07:07:38 +0800
Subject: [web] common

---
 web/src/js/components/common/Button.jsx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 web/src/js/components/common/Button.jsx

(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
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}/>
+            &nbsp;
+            {text}
+        </div>
+    )
+}
-- 
cgit v1.2.3

