UNPKG

1.77 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '@material-ui/core/OverridableComponent';
3import { UsePaginationItem } from '../Pagination/usePagination';
4
5export interface PaginationItemTypeMap<P = {}, D extends React.ElementType = 'div'> {
6 props: P & {
7 /**
8 * The active color.
9 */
10 color?: 'standard' | 'primary' | 'secondary';
11 /**
12 * If `true`, the item will be disabled.
13 */
14 disabled?: boolean;
15 /**
16 * The current page number.
17 */
18 page?: number;
19 /**
20 * If `true` the pagination item is selected.
21 */
22 selected?: boolean;
23 /**
24 * The shape of the pagination item.
25 */
26 shape?: 'round' | 'rounded';
27 /**
28 * The size of the pagination item.
29 */
30 size?: 'small' | 'medium' | 'large';
31 /**
32 * The type of pagination item.
33 */
34 type?: UsePaginationItem['type'];
35 /**
36 * The pagination item variant.
37 */
38 variant?: 'text' | 'outlined';
39 };
40 defaultComponent: D;
41 classKey: PaginationItemClassKey;
42}
43
44/**
45 *
46 * Demos:
47 *
48 * - [Pagination](https://mui.com/components/pagination/)
49 *
50 * API:
51 *
52 * - [PaginationItem API](https://mui.com/api/pagination-item/)
53 */
54declare const PaginationItem: OverridableComponent<PaginationItemTypeMap>;
55
56export type PaginationItemClassKey =
57 | 'root'
58 | 'page'
59 | 'sizeSmall'
60 | 'sizeLarge'
61 | 'textPrimary'
62 | 'textSecondary'
63 | 'outlined'
64 | 'outlinedPrimary'
65 | 'outlinedSecondary'
66 | 'rounded'
67 | 'ellipsis'
68 | 'focusVisible'
69 | 'disabled'
70 | 'selected'
71 | 'icon';
72
73export type PaginationItemProps<
74 D extends React.ElementType = PaginationItemTypeMap['defaultComponent'],
75 P = {}
76> = OverrideProps<PaginationItemTypeMap<P, D>, D>;
77
78export default PaginationItem;