1 | import * as React from 'react';
|
2 | import { OverridableStringUnion } from '@mui/types';
|
3 | import { SxProps } from '@mui/system';
|
4 | import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
|
5 | import { Theme } from '../styles';
|
6 | import { UsePaginationItem } from '../usePagination/usePagination';
|
7 | import { PaginationItemClasses } from './paginationItemClasses';
|
8 | import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
9 |
|
10 | export interface PaginationItemPropsVariantOverrides {}
|
11 |
|
12 | export interface PaginationItemPropsSizeOverrides {}
|
13 |
|
14 | export interface PaginationItemPropsColorOverrides {}
|
15 |
|
16 | export interface PaginationItemSlots {
|
17 | first: React.ElementType;
|
18 | last: React.ElementType;
|
19 | next: React.ElementType;
|
20 | previous: React.ElementType;
|
21 | }
|
22 |
|
23 | export type PaginationItemSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
24 | PaginationItemSlots,
|
25 | {
|
26 | first: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
27 | last: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
28 | next: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
29 | previous: SlotProps<
|
30 | React.ElementType<React.HTMLProps<HTMLElement>>,
|
31 | {},
|
32 | PaginationItemOwnerState
|
33 | >;
|
34 | }
|
35 | >;
|
36 |
|
37 | export interface PaginationItemOwnerState extends PaginationItemProps {}
|
38 |
|
39 | export interface PaginationItemOwnProps extends PaginationItemSlotsAndSlotProps {
|
40 | |
41 |
|
42 |
|
43 | classes?: Partial<PaginationItemClasses>;
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | color?: OverridableStringUnion<
|
51 | 'standard' | 'primary' | 'secondary',
|
52 | PaginationItemPropsColorOverrides
|
53 | >;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | components?: {
|
64 | first?: React.ElementType;
|
65 | last?: React.ElementType;
|
66 | next?: React.ElementType;
|
67 | previous?: React.ElementType;
|
68 | };
|
69 | |
70 |
|
71 |
|
72 |
|
73 | disabled?: boolean;
|
74 | |
75 |
|
76 |
|
77 | page?: React.ReactNode;
|
78 | |
79 |
|
80 |
|
81 |
|
82 | selected?: boolean;
|
83 | |
84 |
|
85 |
|
86 |
|
87 | shape?: 'circular' | 'rounded';
|
88 | |
89 |
|
90 |
|
91 |
|
92 | size?: OverridableStringUnion<'small' | 'medium' | 'large', PaginationItemPropsSizeOverrides>;
|
93 | |
94 |
|
95 |
|
96 | sx?: SxProps<Theme>;
|
97 | |
98 |
|
99 |
|
100 |
|
101 | type?: UsePaginationItem['type'];
|
102 | |
103 |
|
104 |
|
105 |
|
106 | variant?: OverridableStringUnion<'text' | 'outlined', PaginationItemPropsVariantOverrides>;
|
107 | }
|
108 |
|
109 | export interface PaginationItemTypeMap<
|
110 | AdditionalProps = {},
|
111 | RootComponent extends React.ElementType = 'div',
|
112 | > {
|
113 | props: AdditionalProps & PaginationItemOwnProps;
|
114 | defaultComponent: RootComponent;
|
115 | }
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | declare const PaginationItem: OverridableComponent<PaginationItemTypeMap>;
|
128 |
|
129 | export type PaginationItemProps<
|
130 | RootComponent extends React.ElementType = PaginationItemTypeMap['defaultComponent'],
|
131 | AdditionalProps = {},
|
132 | > = OverrideProps<PaginationItemTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
133 | component?: React.ElementType;
|
134 | };
|
135 |
|
136 | export default PaginationItem;
|