Skip to content

Commit faccd96

Browse files
committed
docs: refine README usage and ecosystem note
1 parent 09fef63 commit faccd96

1 file changed

Lines changed: 4 additions & 25 deletions

File tree

README.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
<div align="center">
22
<h1>@rc-component/pagination</h1>
3+
<p><sub>Part of the Ant Design ecosystem.</sub></p>
34
<img alt="Ant Design" height="32" src="https://gw.alipayobjects.com/zos/bmw-prod/ae669a89-0c24-40ff-a91d-2b83497170f6.svg" />
45
<p>📄 React pagination primitives for page navigation, size changing, quick jumping, and locale-aware controls.</p>
56
</div>
67

7-
<p align="center">
8-
<sub>
9-
<a href="https://ant.design">
10-
<img alt="Ant Design" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" height="16">
11-
</a>
12-
Part of the Ant Design ecosystem.
13-
</sub>
14-
</p>
158

169
<div align="center">
1710

@@ -55,28 +48,14 @@ npm install @rc-component/pagination
5548
```tsx | pure
5649
import Pagination from '@rc-component/pagination';
5750
import '@rc-component/pagination/assets/index.css';
58-
import React, { useState } from 'react';
59-
60-
export default () => {
61-
const [current, setCurrent] = useState(1);
62-
63-
return (
64-
<Pagination
65-
current={current}
66-
total={120}
67-
showSizeChanger
68-
showQuickJumper
69-
onChange={setCurrent}
70-
/>
71-
);
72-
};
51+
export default () => (
52+
<Pagination defaultCurrent={1} total={120} showSizeChanger showQuickJumper />
53+
);
7354
```
7455

7556
```tsx | pure
7657
import Pagination from '@rc-component/pagination';
7758
import enUS from '@rc-component/pagination/locale/en_US';
78-
import React from 'react';
79-
8059
export default () => (
8160
<Pagination
8261
defaultCurrent={2}

0 commit comments

Comments
 (0)