Skip to content

Commit

Permalink
tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Oct 19, 2023
1 parent db151df commit 009a6fc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/edit-site/src/components/dataviews/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,18 @@ function Pagination( {
<Button
onClick={ () => onChangeView( { ...view, page: 0 } ) }
disabled={ view.page === 0 }
aria-label={ __( 'First page' ) }
label={ __( 'First page' ) }
icon={ previous }
showTooltip
/>
<Button
onClick={ () =>
onChangeView( { ...view, page: view.page - 1 } )
}
disabled={ view.page === 0 }
aria-label={ __( 'Previous page' ) }
label={ __( 'Previous page' ) }
icon={ chevronLeft }
showTooltip
/>
<HStack
justify="flex-start"
Expand Down Expand Up @@ -127,16 +129,18 @@ function Pagination( {
onChangeView( { ...view, page: view.page + 1 } )
}
disabled={ view.page >= totalPages - 1 }
aria-label={ __( 'Next page' ) }
label={ __( 'Next page' ) }
icon={ chevronRight }
showTooltip
/>
<Button
onClick={ () =>
onChangeView( { ...view, page: totalPages - 1 } )
}
disabled={ view.page >= totalPages - 1 }
aria-label={ __( 'Last page' ) }
label={ __( 'Last page' ) }
icon={ next }
showTooltip
/>
</HStack>
) }
Expand Down

0 comments on commit 009a6fc

Please sign in to comment.