     displayName: 'StrokeWidths'
     getState: -> {strokeWidth: @props.lc.tool?.strokeWidth}
     getInitialState: -> @getState()
+    mixins: [LC.React.Mixins.UpdateOnToolChangeMixin]
+
     render: ->
       {ul, li, svg, circle} = React.DOM
       strokeWidths = [1, 2, 5, 10, 20, 40]

    tool: @props.lc.tool
  }
  getInitialState: -> @getState()
  componentDidMount: ->
    @subscriber = => @setState @getState()
    @props.lc.on 'toolChange', @subscriber
  componentWillUnmount: ->
    @props.lc.removeEventListener('toolChange', @subscriber)

  render: ->
    # style can be null; cast it as a string

  displayName: 'ClearButton'
  getState: -> {isEnabled: @props.lc.canUndo()}
  getInitialState: -> @getState()
  mixins: [LC.React.Mixins.UpdateOnDrawingChangeMixin]

  render: ->
    {div} = React.DOM
