summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-fontsettings/src/index.js
blob: 6ef7ba907b38c48dfa7a8c9a4be84c0cf3f3ada5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const GitBook = require('gitbook-core');
const FontButton = require('./components/FontButton');
const font = require('./actions/font');
const reduce = require('./reducers');

module.exports = GitBook.createPlugin({
    activate: (dispatch, getState, { Components }) => {
        // Dispatch initialization actions
        dispatch(Components.registerComponent(FontButton, { role: 'toolbar:buttons:left' }));
    },
    actions: { font },
    reduce
});