mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-01 14:59:35 +08:00
17 lines
407 B
TypeScript
17 lines
407 B
TypeScript
import React, { useState } from 'react';
|
|
import type { PaginationProps } from 'antd';
|
|
import { Pagination } from 'antd';
|
|
|
|
const App: React.FC = () => {
|
|
const [current, setCurrent] = useState(3);
|
|
|
|
const onChange: PaginationProps['onChange'] = (page) => {
|
|
console.log(page);
|
|
setCurrent(page);
|
|
};
|
|
|
|
return <Pagination current={current} onChange={onChange} total={50} />;
|
|
};
|
|
|
|
export default App;
|