diff options
Diffstat (limited to 'packages/gitbook-plugin-sharing/src/shapes')
-rw-r--r-- | packages/gitbook-plugin-sharing/src/shapes/options.js | 19 | ||||
-rw-r--r-- | packages/gitbook-plugin-sharing/src/shapes/site.js | 13 |
2 files changed, 32 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-sharing/src/shapes/options.js b/packages/gitbook-plugin-sharing/src/shapes/options.js new file mode 100644 index 0000000..885feb6 --- /dev/null +++ b/packages/gitbook-plugin-sharing/src/shapes/options.js @@ -0,0 +1,19 @@ +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; diff --git a/packages/gitbook-plugin-sharing/src/shapes/site.js b/packages/gitbook-plugin-sharing/src/shapes/site.js new file mode 100644 index 0000000..2227429 --- /dev/null +++ b/packages/gitbook-plugin-sharing/src/shapes/site.js @@ -0,0 +1,13 @@ +const { + string, + func, + shape +} = require('gitbook-core').React.PropTypes; + +const siteShape = shape({ + label: string.isRequired, + icon: string.isRequired, + onShare: func.isRequired +}); + +module.exports = siteShape; |