Skip to content

Commit

Permalink
[material-ui][Pagination] Update type parameter of `getItemAriaLabe…
Browse files Browse the repository at this point in the history
…l` prop (#39390)

Co-authored-by: ZeeshanTamboli <[email protected]>
  • Loading branch information
Simer13 and ZeeshanTamboli authored Oct 11, 2023
1 parent e417dcf commit 604d819
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/translations/api-docs/pagination/pagination.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"getItemAriaLabel": {
"description": "Accepts a function which returns a string value that provides a user-friendly name for the current page. This is important for screen reader users.<br>For localization purposes, you can use the provided <a href=\"/material-ui/guides/localization/\">translations</a>.",
"typeDescriptions": {
"type": "The link or button type to format (&#39;page&#39; | &#39;first&#39; | &#39;last&#39; | &#39;next&#39; | &#39;previous&#39;). Defaults to &#39;page&#39;.",
"type": "The link or button type to format (&#39;page&#39; | &#39;first&#39; | &#39;last&#39; | &#39;next&#39; | &#39;previous&#39; | &#39;start-ellipsis&#39; | &#39;end-ellipsis&#39;). Defaults to &#39;page&#39;.",
"page": "The page number to format.",
"selected": "If true, the current page is selected."
}
Expand Down
9 changes: 3 additions & 6 deletions packages/mui-material/src/Pagination/Pagination.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ export interface PaginationProps
* This is important for screen reader users.
*
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
* @param {number} page The page number to format.
* @param {bool} selected If true, the current page is selected.
* @returns {string}
*/
getItemAriaLabel?: (
type: 'page' | 'first' | 'last' | 'next' | 'previous',
page: number,
selected: boolean,
) => string;
getItemAriaLabel?: (type: UsePaginationItem['type'], page: number, selected: boolean) => string;

/**
* Render the item.
* @param {PaginationRenderItemParams} params The props to spread on a PaginationItem.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Pagination.propTypes /* remove-proptypes */ = {
* This is important for screen reader users.
*
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
* @param {number} page The page number to format.
* @param {bool} selected If true, the current page is selected.
* @returns {string}
Expand Down

0 comments on commit 604d819

Please sign in to comment.