diff --git a/packages/ui/src/components/Catalog/BaseCatalog.scss b/packages/ui/src/components/Catalog/BaseCatalog.scss index cdc75ca28..b9e1ae29c 100644 --- a/packages/ui/src/components/Catalog/BaseCatalog.scss +++ b/packages/ui/src/components/Catalog/BaseCatalog.scss @@ -1,3 +1,4 @@ .catalog-list { overflow: auto; + padding: var(--pf-v5-global--spacer--sm); } diff --git a/packages/ui/src/components/Catalog/Catalog.scss b/packages/ui/src/components/Catalog/Catalog.scss index c2818f4a6..19d77a6db 100644 --- a/packages/ui/src/components/Catalog/Catalog.scss +++ b/packages/ui/src/components/Catalog/Catalog.scss @@ -5,7 +5,7 @@ flex-direction: column; &__filter { - margin-bottom: var(--pf-v5-global--spacer--xl); + margin-bottom: var(--pf-v5-global--spacer--md); } &__base { diff --git a/packages/ui/src/components/Catalog/CatalogFilter.scss b/packages/ui/src/components/Catalog/CatalogFilter.scss new file mode 100644 index 000000000..b0f2877a5 --- /dev/null +++ b/packages/ui/src/components/Catalog/CatalogFilter.scss @@ -0,0 +1,16 @@ +.filter-bar { + padding: 0 2px; + display: flex; + flex-flow: row; + justify-content: space-between; + margin-bottom: var(--pf-v5-global--spacer--sm); + + &__search { + flex: 1; + } +} + +.category-bar { + display: flex; + flex-flow: row; +} diff --git a/packages/ui/src/components/Catalog/CatalogFilter.tsx b/packages/ui/src/components/Catalog/CatalogFilter.tsx index c081ea154..7b2c25ec3 100644 --- a/packages/ui/src/components/Catalog/CatalogFilter.tsx +++ b/packages/ui/src/components/Catalog/CatalogFilter.tsx @@ -2,8 +2,6 @@ import { Badge, Form, FormGroup, - Grid, - GridItem, Label, LabelGroup, SearchInput, @@ -11,10 +9,11 @@ import { ToggleGroupItem, capitalize, } from '@patternfly/react-core'; +import { TimesCircleIcon } from '@patternfly/react-icons'; import { FunctionComponent, useEffect, useRef } from 'react'; import { CatalogLayout } from './Catalog.models'; +import './CatalogFilter.scss'; import { CatalogLayoutIcon } from './CatalogLayoutIcon'; -import { TimesCircleIcon } from '@patternfly/react-icons'; interface CatalogFilterProps { className?: string; @@ -63,67 +62,66 @@ export const CatalogFilter: FunctionComponent = (props) => { }; return ( -
- - - - - - +
+ + + + + + + + {props.groups.map((tileGroup) => ( + + {capitalize(tileGroup.name)} {tileGroup.count} + + } + key={tileGroup.name} + data-testid={`${tileGroup.name}-catalog-tab`} + buttonId={`toggle-group-button-${tileGroup.name}`} + isSelected={props.activeGroups.includes(tileGroup.name)} + onChange={(_event, selected: boolean) => toggleActiveGroup(selected, tileGroup.name)} + /> + ))} + + + + + + {props.layouts.map((key) => ( + } + key={key} + data-testid={`toggle-layout-button-${key}`} + buttonId={`toggle-layout-button-${key}`} + aria-label={`toggle-layout-button-${key}`} + isSelected={props.activeLayout === key} + onChange={() => { + props.setActiveLayout(key); + }} + /> + ))} + + + - - - - {props.groups.map((tileGroup) => ( - - {capitalize(tileGroup.name)} {tileGroup.count} - - } - key={tileGroup.name} - data-testid={`${tileGroup.name}-catalog-tab`} - buttonId={`toggle-group-button-${tileGroup.name}`} - isSelected={props.activeGroups.includes(tileGroup.name)} - onChange={(_event, selected: boolean) => toggleActiveGroup(selected, tileGroup.name)} - /> - ))} - - - - - - - {props.layouts.map((key) => ( - } - key={key} - data-testid={`toggle-layout-button-${key}`} - buttonId={`toggle-layout-button-${key}`} - aria-label={`toggle-layout-button-${key}`} - isSelected={props.activeLayout === key} - onChange={() => { - props.setActiveLayout(key); - }} - /> - ))} - - - - 0 ? props.tagsOverflowIndex + 1 : props.tagsOverflowIndex} > {props.filterTags.length > 0 && ( - +
); };