1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
const GitBook = require('gitbook-core'); const { React } = GitBook; const FontButton = React.createClass({ render() { return ( <GitBook.Button> <GitBook.Icon id="font"/> </GitBook.Button> ); } }); module.exports = GitBook.connect(FontButton, (state) => { return { font: state.font }; });