mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-22 22:48:29 +08:00
18 lines
431 B
TypeScript
18 lines
431 B
TypeScript
|
import React from 'react';
|
||
|
import type { PaginationProps } from 'antd';
|
||
|
import { Pagination } from 'antd';
|
||
|
|
||
|
const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => {
|
||
|
if (type === 'prev') {
|
||
|
return <a>Previous</a>;
|
||
|
}
|
||
|
if (type === 'next') {
|
||
|
return <a>Next</a>;
|
||
|
}
|
||
|
return originalElement;
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => <Pagination total={500} itemRender={itemRender} />;
|
||
|
|
||
|
export default App;
|