         body:      React.PropTypes.func
         show:      React.PropTypes.bool
         buttons:   React.PropTypes.array
+        autoHide:  React.PropTypes.bool
         className: React.PropTypes.string
         size:      React.PropTypes.string
 

        uistate:  Lanes.PropTypes.State

    getDefaultProps: ->
        size: 'large'
        buttons: [
            { title: 'Cancel' }
            { title: 'OK', style: 'primary' }


    onButton: (btn) ->
        @selected = btn
        @_hide() if @state.autoHide
        if btn.eventKey is 'ok'
            @state.onOk?(this)
        else
            @state.onCancel?(this)

    componentWillReceiveProps: (nextProps) ->
        @replaceState(nextProps)

    _hide: ->
        @context.viewport.modalProps.show = false
