Skip to content

Commit

Permalink
Remove first/last page buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jul 9, 2024
1 parent 4696cd4 commit 5f210da
Showing 1 changed file with 20 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ import {
} from '@wordpress/components';
import { debounce } from '@wordpress/compose';
import { sprintf, __, _x } from '@wordpress/i18n';
import {
moreVertical,
chevronLeft,
chevronRight,
previous,
next,
} from '@wordpress/icons';
import { moreVertical, chevronLeft, chevronRight } from '@wordpress/icons';

/**
* Internal dependencies
Expand Down Expand Up @@ -457,28 +451,16 @@ function FontCollection( { slug } ) {
justify="center"
className="font-library-modal__footer"
>
<HStack expanded={ false } spacing={ 1 }>
<Button
label={ __( 'First page' ) }
size="compact"
onClick={ () => setPage( 1 ) }
disabled={ page === 1 }
showTooltip
accessibleWhenDisabled
icon={ previous }
tooltipPosition="top"
/>
<Button
label={ __( 'Previous page' ) }
size="compact"
onClick={ () => setPage( page - 1 ) }
disabled={ page === 1 }
showTooltip
accessibleWhenDisabled
icon={ chevronLeft }
tooltipPosition="top"
/>
</HStack>
<Button
label={ __( 'Previous page' ) }
size="compact"
onClick={ () => setPage( page - 1 ) }
disabled={ page === 1 }
showTooltip
accessibleWhenDisabled
icon={ chevronLeft }
tooltipPosition="top"
/>
<HStack
justify="flex-start"
expanded={ false }
Expand Down Expand Up @@ -521,26 +503,15 @@ function FontCollection( { slug } ) {
}
) }
</HStack>
<HStack expanded={ false } spacing={ 1 }>
<Button
label={ __( 'Next page' ) }
size="compact"
onClick={ () => setPage( page + 1 ) }
disabled={ page === totalPages }
accessibleWhenDisabled
icon={ chevronRight }
tooltipPosition="top"
/>
<Button
label={ __( 'Last page' ) }
size="compact"
onClick={ () => setPage( totalPages ) }
disabled={ page === totalPages }
accessibleWhenDisabled
icon={ next }
tooltipPosition="top"
/>
</HStack>
<Button
label={ __( 'Next page' ) }
size="compact"
onClick={ () => setPage( page + 1 ) }
disabled={ page === totalPages }
accessibleWhenDisabled
icon={ chevronRight }
tooltipPosition="top"
/>
</HStack>
) }
</>
Expand Down

0 comments on commit 5f210da

Please sign in to comment.