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} body={body}
footer={footer} footer={footer}
/> />
<Operation rightActive={rightActive} rightArrowText={operations[0]} moveToRight={this.moveTo.bind(this, 'right')} <Operation rightActive={rightActive}
leftActive={leftActive} leftArrowText={operations[1]} moveToLeft={this.moveTo.bind(this, 'left')} rightArrowText={operations[0]}
height={height}/> moveToRight={this.moveTo.bind(this, 'right')}
leftActive={leftActive}
leftArrowText={operations[1]}
moveToLeft={this.moveTo.bind(this, 'left')}
className={prefixCls + '-operation'}
/>
<List titleText={titles[1]} <List titleText={titles[1]}
dataSource={rightDataSource} dataSource={rightDataSource}
filter={rightFilter} filter={rightFilter}

View File

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