Skip to content

Commit aaa4343

Browse files
committed
react icons + custom svgs
1 parent e5a439c commit aaa4343

File tree

14 files changed

+733
-86
lines changed

14 files changed

+733
-86
lines changed

web/package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"react": "^17.0.2",
120120
"react-dom": "^17.0.2",
121121
"react-i18next": "^11.8.11",
122+
"react-icons": "^5.5.0",
122123
"react-modal": "^3.14.4",
123124
"react-router": "^5.3.0",
124125
"react-router-dom": "^5.3.0"

web/src/components/drawer/record/record-field.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ResourceIcon, ResourceLink } from '@openshift-console/dynamic-plugin-sdk';
22
import { Button, Flex, FlexItem, Popover, Text, TextContent, TextVariants, Tooltip } from '@patternfly/react-core';
3-
import { FilterIcon, GlobeAmericasIcon, TimesIcon, ToggleOffIcon, ToggleOnIcon } from '@patternfly/react-icons';
3+
import { GlobeAmericasIcon } from '@patternfly/react-icons';
44
import * as React from 'react';
55
import { useTranslation } from 'react-i18next';
66
import { Link } from 'react-router-dom';
@@ -16,6 +16,7 @@ import { formatPort } from '../../../utils/port';
1616
import { formatProtocol, getProtocolDocUrl } from '../../../utils/protocol';
1717
import { getFlagsList, getTCPFlagsDocUrl } from '../../../utils/tcp-flags';
1818
import { Size } from '../../dropdowns/table-display-dropdown';
19+
import { FilterAddIcon, FilterRemoveIcon, FilterToggleOffIcon, FilterToggleOnIcon } from '../../icons';
1920
import './record-field.css';
2021

2122
export type RecordFieldFilter = {
@@ -635,14 +636,14 @@ export const RecordField: React.FC<RecordFieldProps> = ({
635636
<Button variant="link" aria-label="Filter" onClick={filter.onClick}>
636637
{filter.type === 'filter' ? (
637638
filter.isDelete ? (
638-
<TimesIcon />
639+
<FilterRemoveIcon />
639640
) : (
640-
<FilterIcon />
641+
<FilterAddIcon />
641642
)
642643
) : filter.isDelete ? (
643-
<ToggleOffIcon />
644+
<FilterToggleOffIcon />
644645
) : (
645-
<ToggleOnIcon />
646+
<FilterToggleOnIcon />
646647
)}
647648
</Button>
648649
</Tooltip>

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Dropdown, DropdownItem, MenuToggle, MenuToggleElement } from '@patternfly/react-core';
2-
import { LongArrowAltDownIcon, LongArrowAltUpIcon } from '@patternfly/react-icons';
32
import * as React from 'react';
43
import { useTranslation } from 'react-i18next';
54
import { Match } from '../../model/flow-query';
5+
import { BackAndForthIcon } from '../icons';
66

77
export interface MatchDropdownProps {
88
selected: Match;
@@ -26,12 +26,7 @@ export const MatchDropdown: React.FC<MatchDropdownProps> = ({ allowBidirectional
2626
case 'bidirectional':
2727
if (allowBidirectional) {
2828
if (toggle) {
29-
return (
30-
<div style={{ transform: 'rotate(90deg)' }}>
31-
<LongArrowAltUpIcon />
32-
<LongArrowAltDownIcon />
33-
</div>
34-
);
29+
return <BackAndForthIcon size="1.5em" />;
3530
} else {
3631
return t('Bidirectional');
3732
}

web/src/components/icons/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Icon components for Network Observability
3+
*
4+
* This module exports custom icons and icon wrappers for consistent styling
5+
* across the application. It includes:
6+
* - React Icons wrapper for consistent sizing
7+
* - Kubernetes resource icons
8+
* - Network-specific icons (filters, packets, etc.)
9+
*/
10+
11+
export * from './kubernetes-icons';
12+
export * from './react-icons';
13+
export * from './react-icons-wrapper';

0 commit comments

Comments
 (0)