
## 代码
```jsx
class ModalDoc extends React.Component {
    constructor() {
       super();
    }
    showModal(size) {
       this.setState({modalState: true, size: size});
    }
    closeModal() {
       this.setState({modalState: false});
    }
    render() {
        let {modalState,size} = this.state || {};
        return (
        <div >
            <pre>
              <button className="btn btn-primary" onClick={this.showModal.bind(this,'lg')}>大的模态框</button>
              &nbsp;
              <button className="btn btn-primary" onClick={this.showModal.bind(this,'md')}>中的模态框</button>
              &nbsp;
              <button className="btn btn-primary" onClick={this.showModal.bind(this,'sm')}>小的模态框</button>
            </pre>
            <Modal size={size} title="提示" closebtn={true} show={modalState} onHide={this.closeModal.bind(this)}>
              <div className="modal-body">
                ...
              </div>
              <div className="modal-footer">
                <button type="button" className="btn btn-default" onClick={this.closeModal.bind(this)} >Close</button>
                <button type="button" className="btn btn-primary" onClick={this.closeModal.bind(this)} >Save changes</button>
              </div>
            </Modal>
        </div>)
    }
}
```


## 参数

| 名称 | 类型 | 默认值 | 描述 |
| :-- | :-- | :-- | :-- |
| show | Boolean | false | 显示摸态框 |
| title | String | "" | 显示的title |
| closebtn | Boolean | false | 是否显示关闭按钮 |
| onHide | Function | null | 关闭时调用的方法 |
| size | String | 'lg' | 弹出窗的大小 lg/md/sm |


