content: import React from 'react';
  import { connect } from 'react-redux';
  import ToolBox     from '../compornents/whiteboard/ToolBox.jsx';
  import * as Action from '../actions/toolbox';
  
  // state
  function stateToProps(state) {
      let tool = state.tool;
      return {
          hand:   tool === 'hand'   ? 'is-active' : '',
          select: tool === 'select' ? 'is-active' : '',
          pencil: tool === 'pencil' ? 'is-active' : '',
          line:   tool === 'line'   ? 'is-active' : '',
          eraser: tool === 'eraser' ? 'is-active' : ''
      };
  }
  
  // dispatch
  function dispatchToProps(dispatch) {
      return {
          zoomIn()  { dispatch(Action.zoomIn()); },
          zoomOut() { dispatch(Action.zoomOut()); },
          change(tool) { dispatch(Action.change(tool)); }
      };
  }
  
  // connectでReduxとReactコンポーネントをつなぐ
  export default connect(
      stateToProps,
      dispatchToProps
  )(ToolBox);
  