mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
Fix ts compile error
This commit is contained in:
parent
1338c4f4f8
commit
5e7c735935
@ -14,37 +14,38 @@ export interface TransferOperationProps {
|
||||
rightActive?: boolean;
|
||||
}
|
||||
|
||||
export default (props: TransferOperationProps) => {
|
||||
const {
|
||||
moveToLeft = noop,
|
||||
moveToRight = noop,
|
||||
leftArrowText = '',
|
||||
rightArrowText = '',
|
||||
leftActive,
|
||||
rightActive,
|
||||
className,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
disabled={!leftActive}
|
||||
onClick={moveToLeft}
|
||||
icon="left"
|
||||
>
|
||||
{leftArrowText}
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
disabled={!rightActive}
|
||||
onClick={moveToRight}
|
||||
icon="right"
|
||||
>
|
||||
{rightArrowText}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default class Operation extends React.Component<TransferOperationProps, any> {
|
||||
render() {
|
||||
const {
|
||||
moveToLeft = noop,
|
||||
moveToRight = noop,
|
||||
leftArrowText = '',
|
||||
rightArrowText = '',
|
||||
leftActive,
|
||||
rightActive,
|
||||
className,
|
||||
} = this.props;
|
||||
return (
|
||||
<div className={className}>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
disabled={!leftActive}
|
||||
onClick={moveToLeft}
|
||||
icon="left"
|
||||
>
|
||||
{leftArrowText}
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
disabled={!rightActive}
|
||||
onClick={moveToRight}
|
||||
icon="right"
|
||||
>
|
||||
{rightArrowText}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user