Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global styles: display tooltips for pagination buttons on styles revision #62395

Merged
merged 4 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,15 @@
// Safari from rendering the page / total text.
will-change: opacity;
}

.components-button.is-tertiary {
font-size: 28px;
font-weight: 200;
color: $gray-900;
margin-bottom: $grid-unit-05;
line-height: 1.2;
}

.components-button.is-tertiary:disabled,
.components-button.is-tertiary[aria-disabled="true"] {
color: $gray-600;
}
.components-button.is-tertiary:hover {
background: transparent;
}
}

.edit-site-global-styles-screen-revisions__footer {
Expand Down
33 changes: 17 additions & 16 deletions packages/edit-site/src/components/pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Button,
} from '@wordpress/components';
import { __, _x, _n, sprintf } from '@wordpress/i18n';
import { previous, chevronLeft, chevronRight, next } from '@wordpress/icons';

export default function Pagination( {
currentPage,
Expand Down Expand Up @@ -48,19 +49,19 @@ export default function Pagination( {
onClick={ () => changePage( 1 ) }
__experimentalIsFocusable
disabled={ disabled || currentPage === 1 }
aria-label={ __( 'First page' ) }
>
«
</Button>
label={ __( 'First page' ) }
icon={ previous }
size="compact"
/>
<Button
variant={ buttonVariant }
onClick={ () => changePage( currentPage - 1 ) }
__experimentalIsFocusable
disabled={ disabled || currentPage === 1 }
aria-label={ __( 'Previous page' ) }
>
</Button>
label={ __( 'Previous page' ) }
icon={ chevronLeft }
size="compact"
/>
</HStack>
<Text variant="muted">
{ sprintf(
Expand All @@ -76,19 +77,19 @@ export default function Pagination( {
onClick={ () => changePage( currentPage + 1 ) }
__experimentalIsFocusable
disabled={ disabled || currentPage === numPages }
aria-label={ __( 'Next page' ) }
>
</Button>
label={ __( 'Next page' ) }
icon={ chevronRight }
size="compact"
/>
<Button
variant={ buttonVariant }
onClick={ () => changePage( numPages ) }
__experimentalIsFocusable
disabled={ disabled || currentPage === numPages }
aria-label={ __( 'Last page' ) }
>
»
</Button>
label={ __( 'Last page' ) }
icon={ next }
size="compact"
/>
</HStack>
</HStack>
);
Expand Down
Loading