button should inside children

This commit is contained in:
afc163 2015-08-18 17:05:56 +08:00
parent 24b81829a1
commit 1e7cf6d364
2 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,9 @@ var props = {
React.render(
<Upload {...props}>
<i className="anticon anticon-upload"></i> 点击上传
<button className="ant-btn ant-btn-ghost">
<i className="anticon anticon-upload"></i> 点击上传
</button>
</Upload>,
document.getElementById('components-upload-demo-basic')
);

View File

@ -96,9 +96,7 @@ let AntUpload = React.createClass({
return (
<div className={prefixCls + ' ' + prefixCls + '-select'}>
<Upload {...props}>
<button className='ant-btn ant-btn-ghost'>
{this.props.children}
</button>
{this.props.children}
</Upload>
<UploadList items={this.state.downloadList} />
</div>