From f25bab88d39a4b35384f21950d886b83a78dc6b0 Mon Sep 17 00:00:00 2001 From: James Koster Date: Mon, 22 Jul 2024 16:39:54 +0100 Subject: [PATCH 01/14] Apply minimal variant to pagination dropdown --- .../components/dataviews-pagination/index.tsx | 61 +++++++++---------- .../dataviews-pagination/style.scss | 10 +-- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/packages/dataviews/src/components/dataviews-pagination/index.tsx b/packages/dataviews/src/components/dataviews-pagination/index.tsx index f8ebf41469d949..f325fbc1a76dc7 100644 --- a/packages/dataviews/src/components/dataviews-pagination/index.tsx +++ b/packages/dataviews/src/components/dataviews-pagination/index.tsx @@ -40,38 +40,35 @@ function DataViewsPagination() { spacing={ 2 } className="dataviews-pagination__page-selection" > - { createInterpolateElement( - sprintf( - // translators: %s: Total number of pages. - _x( 'Page of %s', 'paging' ), - totalPages - ), - { - CurrentPageControl: ( - { - const page = i + 1; - return { - value: page.toString(), - label: page.toString(), - }; - } ) } - onChange={ ( newValue ) => { - onChangeView( { - ...view, - page: +newValue, - } ); - } } - size="compact" - __nextHasNoMarginBottom - /> - ), - } - ) } + { + const page = i + 1; + return { + value: page.toString(), + label: + __( 'Page ' ) + + page.toString() + + sprintf( + // translators: %s: Total number of pages. + _x( ' of %s', 'paging' ), + totalPages + ), + }; + } + ) } + onChange={ ( newValue ) => { + onChangeView( { + ...view, + page: +newValue, + } ); + } } + size="compact" + __nextHasNoMarginBottom + variant="minimal" + />