Skip to content

Commit 7da657e

Browse files
committed
improve match dropdown
1 parent 00bcfac commit 7da657e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

web/src/components/dropdowns/match-dropdown.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Dropdown, DropdownItem, MenuToggle, MenuToggleElement } from '@patternfly/react-core';
2-
import { LongArrowAltDownIcon, LongArrowAltUpIcon, RouteIcon } from '@patternfly/react-icons';
2+
import { BarsIcon, ListIcon, RouteIcon } from '@patternfly/react-icons';
33
import * as React from 'react';
44
import { useTranslation } from 'react-i18next';
55
import { Match } from '../../model/flow-query';
@@ -10,7 +10,7 @@ export interface MatchDropdownProps {
1010
id?: string;
1111
}
1212

13-
export const MatchValues = ['any', 'all', 'peers'] as Match[];
13+
export const MatchValues = ['all', 'any', 'peers'] as Match[];
1414

1515
export const MatchDropdown: React.FC<MatchDropdownProps> = ({ selected, setMatch, id }) => {
1616
const { t } = useTranslation('plugin__netobserv-plugin');
@@ -32,14 +32,9 @@ export const MatchDropdown: React.FC<MatchDropdownProps> = ({ selected, setMatch
3232
const getIcon = (layoutName: Match) => {
3333
switch (layoutName) {
3434
case 'any':
35-
return (
36-
<>
37-
<LongArrowAltUpIcon />
38-
<LongArrowAltDownIcon />
39-
</>
40-
);
35+
return <BarsIcon />;
4136
case 'all':
42-
return <LongArrowAltUpIcon />;
37+
return <ListIcon />;
4338
case 'peers':
4439
return <RouteIcon />;
4540
default:
@@ -77,6 +72,8 @@ export const MatchDropdown: React.FC<MatchDropdownProps> = ({ selected, setMatch
7772
setMatch(v);
7873
}}
7974
>
75+
{getIcon(v)}
76+
&nbsp;
8077
{getMatchDisplay(v)}
8178
</DropdownItem>
8279
))}

0 commit comments

Comments
 (0)