From ae5feee10201e39af982cdf92fb825f920dd8437 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 15 Nov 2021 13:43:18 -0500 Subject: [PATCH 1/7] Wrap toolbar filters with PF ToolbarToggleGroup https://issues.redhat.com/browse/COST-2065 --- .../components/priceListToolbar.tsx | 32 ++++++++++++------- .../costModel/assignSourcesModalToolbar.tsx | 17 +++++++--- .../costModels/costModel/sourcesToolbar.tsx | 22 +++++++------ .../costModels/costModelsDetails/toolbar.tsx | 27 ++++++++++------ .../assignSourcesToolbar.tsx | 17 +++++++--- .../components/dataToolbar/dataToolbar.tsx | 25 ++++++++------- 6 files changed, 88 insertions(+), 52 deletions(-) diff --git a/src/pages/costModels/components/priceListToolbar.tsx b/src/pages/costModels/components/priceListToolbar.tsx index f605ebfb3..063c76796 100644 --- a/src/pages/costModels/components/priceListToolbar.tsx +++ b/src/pages/costModels/components/priceListToolbar.tsx @@ -5,7 +5,9 @@ import { ToolbarGroup, ToolbarItem, ToolbarItemVariant, + ToolbarToggleGroup, } from '@patternfly/react-core'; +import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import React from 'react'; import { styles } from './priceListToolbar.styles'; @@ -35,18 +37,24 @@ export const PriceListToolbar: React.SFC = ({ return ( - - {primary} - {secondaries.map(secondary => { - return ( - - - {selected === secondary.name ? secondary.component : ''} - - - ); - })} - + }> + + {primary} + {secondaries.map(secondary => { + return ( + + + {selected === secondary.name ? secondary.component : ''} + + + ); + })} + + {button} {pagination} diff --git a/src/pages/costModels/costModel/assignSourcesModalToolbar.tsx b/src/pages/costModels/costModel/assignSourcesModalToolbar.tsx index 277653b22..ad28c8b97 100644 --- a/src/pages/costModels/costModel/assignSourcesModalToolbar.tsx +++ b/src/pages/costModels/costModel/assignSourcesModalToolbar.tsx @@ -8,7 +8,9 @@ import { ToolbarContent, ToolbarFilter, ToolbarItem, + ToolbarToggleGroup, } from '@patternfly/react-core'; +import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; import messages from 'locales/messages'; import React from 'react'; @@ -64,11 +66,16 @@ export const AssignSourcesToolbarBase: React.SFC return ( - - - - - + }> + + + + + + = ({ return ( - - - - - + }> + + + + + +