@idares-ui/react
Version:
94 lines (61 loc) • 1.58 kB
Markdown
---
1. [ Available components ](
2. [ Installation ](
3. [ Usage ](
- [Default usage](
- [Control `page`](
- [Props](
4. [ Storybook docs ](
<a name="available-components"></a>
- Pagination
- ...
<a name="installation"></a>
Using npm:
```javascript
$ npm install @idares-ui/react
```
Using yarn:
```javascript
$ yarn add @idares-ui/react
```
<a name="usage"></a>
<a name="default-usage"></a>
```javascript
import { Pagination } from "@idares-ui/react";
...
<Pagination />
...
```
<a name="control-page"></a>
```javascript
import { Pagination } from "@idares-ui/react";
...
const [page, setPage] = React.useState(1);
...
<Pagination page={page} setPage={setPage} />
...
```
<a name="props"></a>
| Prop | Type | Default |
| --------- | :------: | ------: |
| page | number | `1` |
| perPage | number | `10` |
| count | number | `60` |
| setPage | function | `void` |
| baseSize | bsType | `"xl"` |
| baseColor | string | `null` |
```typescript
bsType = "xs" | "sm" | "md" | "lg" | "xl" | <css-size-units>
```
<a name="story-book"></a>
View the full Storybook documentation [ here ](