summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-sharing/src/optionsShape.js
diff options
context:
space:
mode:
authorNicolas Gaborit <soreine.plume@gmail.com>2016-10-13 12:56:46 +0200
committerSamy Pessé <samypesse@gmail.com>2016-10-13 12:56:46 +0200
commit3aea3e5d88384822440517c9a2b722c405547155 (patch)
tree84ef0448c7e2e7ed95941f2795e86ca65f7cd809 /packages/gitbook-plugin-sharing/src/optionsShape.js
parent95b3b4ebb7277f7a96ee79e5d75baafb3b5aab1e (diff)
downloadgitbook-3aea3e5d88384822440517c9a2b722c405547155.zip
gitbook-3aea3e5d88384822440517c9a2b722c405547155.tar.gz
gitbook-3aea3e5d88384822440517c9a2b722c405547155.tar.bz2
Adapt plugin sharing (#1553)
* Reuse old package config * Add plugin config shape * Add ButtonGroup to core components * List all sharing sites * Displaying buttons from config * First iteration of Dropdown component (need CSS) * Using Dropdown for sharing button * Create HotKeys component * Move Backdrop to its own file * Trying a cleaner API for Dropdown * Add README.md * livereload: Add missing gitbook-plugin dependency * sharing: Now use Immutable state * sharing: Adapt quickly to new Dropdown * sharing: Fix sharing from dropdown
Diffstat (limited to 'packages/gitbook-plugin-sharing/src/optionsShape.js')
-rw-r--r--packages/gitbook-plugin-sharing/src/optionsShape.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-sharing/src/optionsShape.js b/packages/gitbook-plugin-sharing/src/optionsShape.js
new file mode 100644
index 0000000..dd51016
--- /dev/null
+++ b/packages/gitbook-plugin-sharing/src/optionsShape.js
@@ -0,0 +1,20 @@
+const {
+ bool,
+ arrayOf,
+ oneOf,
+ shape
+} = require('gitbook-core').React.PropTypes;
+
+const { ALL } = require('./SITES');
+
+const optionsShape = shape({
+ facebook: bool,
+ twitter: bool,
+ google: bool,
+ weibo: bool,
+ instapaper: bool,
+ vk: bool,
+ all: arrayOf(oneOf(ALL)).isRequired
+});
+
+module.exports = optionsShape;