diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-09-28 18:14:35 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-09-28 18:14:35 +0200 |
commit | 287c80b2e116572669f2a7073731ba7350e3619a (patch) | |
tree | 1572bab423b927e16bca4d56020aeec6442fe1a9 /packages/gitbook-plugin-search/src/index.js | |
parent | 26fc021b900f6b28a180fa8360313b3193e6bf5e (diff) | |
download | gitbook-287c80b2e116572669f2a7073731ba7350e3619a.zip gitbook-287c80b2e116572669f2a7073731ba7350e3619a.tar.gz gitbook-287c80b2e116572669f2a7073731ba7350e3619a.tar.bz2 |
Start search plugin
Diffstat (limited to 'packages/gitbook-plugin-search/src/index.js')
-rw-r--r-- | packages/gitbook-plugin-search/src/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-search/src/index.js b/packages/gitbook-plugin-search/src/index.js new file mode 100644 index 0000000..94a5d35 --- /dev/null +++ b/packages/gitbook-plugin-search/src/index.js @@ -0,0 +1,13 @@ +const GitBook = require('gitbook-core'); + +const SearchInput = require('./components/Input'); +const SearchResults = require('./components/Results'); +const reducers = require('./reducers'); + +module.exports = GitBook.createPlugin( + (dispatch, state) => { + dispatch(GitBook.registerComponent(SearchInput, { role: 'search:input' })); + dispatch(GitBook.registerComponent(SearchResults, { role: 'search:results' })); + }, + reducers +); |