summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-sharing/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-plugin-sharing/src')
-rw-r--r--packages/gitbook-plugin-sharing/src/Button.js17
-rw-r--r--packages/gitbook-plugin-sharing/src/index.js6
2 files changed, 23 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-sharing/src/Button.js b/packages/gitbook-plugin-sharing/src/Button.js
new file mode 100644
index 0000000..0cfce7c
--- /dev/null
+++ b/packages/gitbook-plugin-sharing/src/Button.js
@@ -0,0 +1,17 @@
+const React = require('react');
+const GitBook = require('gitbook-core');
+
+const ShareButton = React.createClass({
+ render() {
+ return (
+ <button>Share</button>
+ );
+ }
+});
+
+function mapStateToProps(state) {
+
+}
+
+
+module.exports = GitBook.connect(ShareButton, mapStateToProps);
diff --git a/packages/gitbook-plugin-sharing/src/index.js b/packages/gitbook-plugin-sharing/src/index.js
new file mode 100644
index 0000000..e33a470
--- /dev/null
+++ b/packages/gitbook-plugin-sharing/src/index.js
@@ -0,0 +1,6 @@
+const GitBook = require('gitbook-core');
+const ShareButton = require('./Button');
+
+module.exports = GitBook.createPlugin((dispatch, state) => {
+ dispatch(GitBook.registerComponent(ShareButton, { role: 'Toolbar:ActionButton' }));
+});