UNPKG

3.2 kBTypeScriptView Raw
1import * as React from 'react';
2import { IconButtonProps } from '../IconButton/IconButton';
3import { SvgIconProps } from '../SvgIcon';
4
5export interface TablePaginationActionsProps extends React.HTMLAttributes<HTMLDivElement> {
6 /**
7 * This prop is an alias for `slotProps.previousButton` and will be overriden by it if both are used.
8 * @deprecated Use `slotProps.previousButton` instead.
9 */
10 backIconButtonProps?: Partial<IconButtonProps>;
11 /**
12 * Override or extend the styles applied to the component.
13 */
14 classes?: {};
15 count: number;
16 /**
17 * If `true`, the component is disabled.
18 * @default false
19 */
20 disabled?: boolean;
21 /**
22 * Accepts a function which returns a string value that provides a user-friendly name for the current page.
23 * This is important for screen reader users.
24 *
25 * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
26 * @param {string} type The link or button type to format ('first' | 'last' | 'next' | 'previous').
27 * @returns {string}
28 */
29 getItemAriaLabel: (type: 'first' | 'last' | 'next' | 'previous') => string;
30 /**
31 * This prop is an alias for `slotProps.nextButton` and will be overriden by it if both are used.
32 * @deprecated Use `slotProps.nextButton` instead.
33 */
34 nextIconButtonProps?: Partial<IconButtonProps>;
35 onPageChange: (event: React.MouseEvent<HTMLButtonElement> | null, page: number) => void;
36 page: number;
37 rowsPerPage: number;
38 showFirstButton: boolean;
39 showLastButton: boolean;
40 slotProps?: {
41 firstButton?: Partial<IconButtonProps>;
42 lastButton?: Partial<IconButtonProps>;
43 nextButton?: Partial<IconButtonProps>;
44 previousButton?: Partial<IconButtonProps>;
45 firstButtonIcon?: Partial<SvgIconProps>;
46 lastButtonIcon?: Partial<SvgIconProps>;
47 nextButtonIcon?: Partial<SvgIconProps>;
48 previousButtonIcon?: Partial<SvgIconProps>;
49 };
50 slots?: TablePaginationActionsSlots;
51}
52
53export interface TablePaginationActionsSlots {
54 /**
55 * The component that renders the first button.
56 * @default IconButton
57 */
58 firstButton?: React.ElementType;
59 /**
60 * The component that renders the last button.
61 * @default IconButton
62 */
63 lastButton?: React.ElementType;
64 /**
65 * The component that renders the next button.
66 * @default IconButton
67 */
68 nextButton?: React.ElementType;
69 /**
70 * The component that renders the previous button.
71 * @default IconButton
72 */
73 previousButton?: React.ElementType;
74 /**
75 * The component that renders the first button icon.
76 * @default FirstPageIcon
77 */
78 firstButtonIcon?: React.ElementType;
79 /**
80 * The component that renders the last button icon.
81 * @default LastPageIcon
82 */
83 lastButtonIcon?: React.ElementType;
84 /**
85 * The component that renders the next button icon.
86 * @default KeyboardArrowRight
87 */
88 nextButtonIcon?: React.ElementType;
89 /**
90 * The component that renders the previous button icon.
91 * @default KeyboardArrowLeft
92 */
93 previousButtonIcon?: React.ElementType;
94}
95
96declare const TablePaginationActions: React.JSXElementConstructor<TablePaginationActionsProps>;
97
98export default TablePaginationActions;