From 7d2f9def7a9ce820d042738ca8ac69a8a254be03 Mon Sep 17 00:00:00 2001 From: Eric Olkowski Date: Mon, 15 Jan 2024 09:53:06 -0500 Subject: [PATCH 1/4] feat(Pagination): applied Penta updates --- .../src/components/Pagination/Pagination.tsx | 4 - .../Pagination/PaginationOptionsMenu.tsx | 3 +- .../PaginationOptionsMenu.test.tsx.snap | 4 +- .../Pagination/__tests__/Pagination.test.tsx | 10 -- .../__snapshots__/Pagination.test.tsx.snap | 152 +++++++++++------- 5 files changed, 101 insertions(+), 72 deletions(-) diff --git a/packages/react-core/src/components/Pagination/Pagination.tsx b/packages/react-core/src/components/Pagination/Pagination.tsx index 60420953b42..013dea5b4dd 100644 --- a/packages/react-core/src/components/Pagination/Pagination.tsx +++ b/packages/react-core/src/components/Pagination/Pagination.tsx @@ -108,8 +108,6 @@ export interface PaginationProps extends React.HTMLProps, OUIAPr dropDirection?: 'up' | 'down'; /** Page to start at. */ firstPage?: number; - /** @beta Flag indicating that pagination should use page insets. */ - usePageInsets?: boolean; /** @beta Insets at various breakpoints. */ inset?: { default?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl'; @@ -227,7 +225,6 @@ export const Pagination: React.FunctionComponent = ({ onLastClick = () => undefined, ouiaId, ouiaSafe = true, - usePageInsets, inset, ...props }: PaginationProps) => { @@ -283,7 +280,6 @@ export const Pagination: React.FunctionComponent = ({ className={css( styles.pagination, variant === PaginationVariant.bottom && styles.modifiers.bottom, - usePageInsets && styles.modifiers.pageInsets, formatBreakpointMods(inset, styles), isStatic && styles.modifiers.static, isSticky && styles.modifiers.sticky, diff --git a/packages/react-core/src/components/Pagination/PaginationOptionsMenu.tsx b/packages/react-core/src/components/Pagination/PaginationOptionsMenu.tsx index 8d8f624f98e..8b050b283ff 100644 --- a/packages/react-core/src/components/Pagination/PaginationOptionsMenu.tsx +++ b/packages/react-core/src/components/Pagination/PaginationOptionsMenu.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import styles from '@patternfly/react-styles/css/components/Pagination/pagination'; import { css } from '@patternfly/react-styles'; import { Menu, MenuContent, MenuList, MenuItem } from '../Menu'; import { MenuToggle } from '../MenuToggle'; @@ -210,7 +211,7 @@ export const PaginationOptionsMenu: React.FunctionComponent +
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+