mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 09:51:36 +00:00
fix(pagination): use singular page range text if total is 1
This commit is contained in:
parent
37c7f07448
commit
3d64fb2431
1 changed files with 2 additions and 1 deletions
|
@ -82,7 +82,8 @@
|
|||
* Override the page range text
|
||||
* @type {(current: number, total: number) => string} [pageRangeText = (current: number, total: number) => string]
|
||||
*/
|
||||
export let pageRangeText = (current, total) => `of ${total} pages`;
|
||||
export let pageRangeText = (current, total) =>
|
||||
`of ${total} page${total === 1 ? "" : "s"}`;
|
||||
|
||||
/**
|
||||
* Set an id for the top-level element
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue