Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfarrant committed Feb 19, 2025
1 parent a413cc5 commit 1130807
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/react/src/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@ export const Pagination = memo(

const getSummaryClasses = useCallback(() => {
if (showPages === true) {
return styles['Pagination--hidden']
}

if (typeof showPages === 'object') {
return styles['Pagination__hidden']
} else if (typeof showPages === 'object') {
return Object.entries(showPages).reduce<string[]>((acc, [key, value]) => {
if (value) {
acc.push(styles[`Pagination__hidden-${key as 'narrow' | 'regular' | 'wide'}`])
Expand All @@ -91,6 +89,8 @@ export const Pagination = memo(
return acc
}, [])
}

return styles['Pagination__visible']
}, [showPages])

return (
Expand Down Expand Up @@ -142,8 +142,8 @@ export function usePaginationPages({
)

const getPagesClasses = useCallback(() => {
if (typeof showPages === 'boolean') {
return !showPages ? styles['Pagination--hidden'] : undefined
if (showPages === false) {
return styles['Pagination--hidden']
}

if (typeof showPages === 'object') {
Expand Down

0 comments on commit 1130807

Please sign in to comment.