ant-design/components/pagination/index.jsx

26 lines
631 B
React
Raw Normal View History

import React from 'react';
import Pagination from 'rc-pagination';
import Select from 'rc-select';
2015-11-16 14:10:42 +08:00
import zhCN from './locale/zh_CN';
2015-07-13 01:04:05 +08:00
const prefixCls = 'ant-pagination';
2015-07-13 01:04:05 +08:00
2015-11-16 14:10:42 +08:00
class AntPagination extends React.Component {
2015-07-13 01:04:05 +08:00
render() {
let className = this.props.className;
if (this.props.size === 'small') {
className += ' mini';
}
2015-07-15 17:32:32 +08:00
return <Pagination selectComponentClass={Select}
2015-11-16 14:10:42 +08:00
selectPrefixCls="ant-select"
prefixCls={prefixCls}
{...this.props} className={className}/>;
2015-07-13 01:04:05 +08:00
}
}
2015-11-16 14:10:42 +08:00
AntPagination.defaultProps = {
locale: zhCN,
};
export default AntPagination;