Skip to content

Commit

Permalink
feat: handle properly empty title on Pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
AtelyPham committed Oct 25, 2024
1 parent 98053a6 commit ce7ec83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Pagination = React.forwardRef<HTMLDivElement, PaginationProps>(
siblingCount,
totalItems,
totalPages,
title,
title = '',
iconSize = 'lg',
...props
},
Expand Down Expand Up @@ -70,7 +70,7 @@ export const Pagination = React.forwardRef<HTMLDivElement, PaginationProps>(
<p className="body1 text-mono-160 dark:text-mono-100">
{totalItems === 0
? 'No items'
: `Showing ${showingItemsCount} ${title} out of ${totalItems ?? '-'}`}
: `Showing ${showingItemsCount} ${title ? `${title} ` : ''}out of ${totalItems ?? '-'}`}
</p>

{/** Right buttons */}
Expand Down

0 comments on commit ce7ec83

Please sign in to comment.