update transfer operation className

This commit is contained in:
afc163 2015-12-24 15:31:03 +08:00
parent 50565eef0f
commit 5c9a75c8bc
2 changed files with 11 additions and 9 deletions

View File

@ -173,9 +173,14 @@ class Transfer extends Component {
body={body}
footer={footer}
/>
<Operation rightActive={rightActive} rightArrowText={operations[0]} moveToRight={this.moveTo.bind(this, 'right')}
leftActive={leftActive} leftArrowText={operations[1]} moveToLeft={this.moveTo.bind(this, 'left')}
height={height}/>
<Operation rightActive={rightActive}
rightArrowText={operations[0]}
moveToRight={this.moveTo.bind(this, 'right')}
leftActive={leftActive}
leftArrowText={operations[1]}
moveToLeft={this.moveTo.bind(this, 'left')}
className={prefixCls + '-operation'}
/>
<List titleText={titles[1]}
dataSource={rightDataSource}
filter={rightFilter}

View File

@ -14,7 +14,7 @@ class TransferOperation extends Component {
rightArrowText,
leftActive,
rightActive,
prefixCls,
className,
} = this.props;
const moveToLeftButton = (
@ -26,7 +26,6 @@ class TransferOperation extends Component {
}
</Button>
);
const moveToRightButton = (
<Button type="primary" disabled={!rightActive} onClick={moveToRight}>
{
@ -36,8 +35,7 @@ class TransferOperation extends Component {
}
</Button>
);
return <div className={prefixCls}>
return <div className={className}>
{moveToLeftButton}
{moveToRightButton}
</div>;
@ -45,7 +43,6 @@ class TransferOperation extends Component {
}
TransferOperation.defaultProps = {
prefixCls: 'ant-transfer-operation',
leftArrowText: '',
rightArrowText: '',
moveToLeft: noop,
@ -53,7 +50,7 @@ TransferOperation.defaultProps = {
};
TransferOperation.propTypes = {
prefixCls: PropTypes.string,
className: PropTypes.string,
leftArrowText: PropTypes.string,
rightArrowText: PropTypes.string,
moveToLeft: PropTypes.func,