Skip to content

Commit 4cc476a

Browse files
fix(InfrastructureIcons): replaced with RH brand icons part 4 (#12504)
* fix(InfrastructureIcons): replaced with RH brand icons part 4 * Updated snapshots
1 parent 80f6ca0 commit 4cc476a

20 files changed

Lines changed: 48 additions & 65 deletions

File tree

packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import { getResizeObserver } from '@patternfly/react-core/dist/esm/helpers/resiz
1717
import Editor, { BeforeMount, EditorProps, Monaco } from '@monaco-editor/react';
1818
import type { editor } from 'monaco-editor';
1919
import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
20-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
21-
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
20+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
21+
import RhUiDownloadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-download-icon';
2222
import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon';
2323
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
2424
import Dropzone, { FileRejection } from 'react-dropzone';
@@ -541,15 +541,15 @@ export const CodeEditor = ({
541541
)}
542542
{isUploadEnabled && (
543543
<CodeEditorControl
544-
icon={<UploadIcon />}
544+
icon={<RhUiUploadIcon />}
545545
aria-label={uploadButtonAriaLabel}
546546
tooltipProps={{ content: <div>{uploadButtonToolTipText}</div>, ...tooltipProps }}
547547
onClick={open}
548548
/>
549549
)}
550550
{isDownloadEnabled && (!showEmptyState || !!value) && (
551551
<CodeEditorControl
552-
icon={<DownloadIcon />}
552+
icon={<RhUiDownloadIcon />}
553553
aria-label={downloadButtonAriaLabel}
554554
tooltipProps={{ content: <div>{downloadButtonToolTipText}</div>, ...tooltipProps }}
555555
onClick={() => {

packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,12 @@ exports[`Matches snapshot with control buttons enabled 1`] = `
6969
fill="currentColor"
7070
height="1em"
7171
role="img"
72+
viewBox="0 0 32 32"
7273
width="1em"
7374
>
74-
<svg
75-
class="pf-v6-icon-default"
76-
viewBox="0 0 512 512"
77-
>
78-
<path
79-
d="M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"
80-
/>
81-
</svg>
82-
<svg
83-
class="pf-v6-icon-rh-ui"
84-
viewBox="0 0 32 32"
85-
>
86-
<path
87-
d="M30 29a1 1 0 0 1-1 1H3a1 1 0 1 1 0-2h26a1 1 0 0 1 1 1ZM7.707 12.707 15 5.414V24a1 1 0 1 0 2 0V5.414l7.293 7.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414l-8.646-8.647a1.5 1.5 0 0 0-2.121 0l-8.647 8.647a.999.999 0 1 0 1.414 1.414Z"
88-
/>
89-
</svg>
75+
<path
76+
d="M30 29a1 1 0 0 1-1 1H3a1 1 0 1 1 0-2h26a1 1 0 0 1 1 1ZM7.707 12.707 15 5.414V24a1 1 0 1 0 2 0V5.414l7.293 7.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414l-8.646-8.647a1.5 1.5 0 0 0-2.121 0l-8.647 8.647a.999.999 0 1 0 1.414 1.414Z"
77+
/>
9078
</svg>
9179
</span>
9280
</button>
@@ -111,24 +99,12 @@ exports[`Matches snapshot with control buttons enabled 1`] = `
11199
fill="currentColor"
112100
height="1em"
113101
role="img"
102+
viewBox="0 0 32 32"
114103
width="1em"
115104
>
116-
<svg
117-
class="pf-v6-icon-default"
118-
viewBox="0 0 512 512"
119-
>
120-
<path
121-
d="M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"
122-
/>
123-
</svg>
124-
<svg
125-
class="pf-v6-icon-rh-ui"
126-
viewBox="0 0 32 32"
127-
>
128-
<path
129-
d="M30 29a1 1 0 0 1-1 1H3a1 1 0 0 1 0-2h26a1 1 0 0 1 1 1Zm-15.061-4.646c.292.292.676.438 1.061.438s.768-.146 1.061-.438l8.646-8.646a.999.999 0 1 0-1.414-1.414L17 21.587V3a1 1 0 0 0-2 0v18.586l-7.293-7.293a.999.999 0 1 0-1.414 1.414l8.646 8.646Z"
130-
/>
131-
</svg>
105+
<path
106+
d="M30 29a1 1 0 0 1-1 1H3a1 1 0 0 1 0-2h26a1 1 0 0 1 1 1Zm-15.061-4.646c.292.292.676.438 1.061.438s.768-.146 1.061-.438l8.646-8.646a.999.999 0 1 0-1.414-1.414L17 21.587V3a1 1 0 0 0-2 0v18.586l-7.293-7.293a.999.999 0 1 0-1.414 1.414l8.646 8.646Z"
107+
/>
132108
</svg>
133109
</span>
134110
</button>

packages/react-core/src/components/Button/examples/Button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import RhUiExternalLinkFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-
1212
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
1313
import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
1414
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
15-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
15+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
1616
import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
1717
import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
1818

packages/react-core/src/components/Button/examples/ButtonCircle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-micron
33
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
44
import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
55
import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
6-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
6+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
77

88
interface LoadingPropsType {
99
spinnerAriaValueText: string;
@@ -75,7 +75,7 @@ export const ButtonCircle: React.FunctionComponent = () => {
7575
isCircle
7676
{...(!isUploading && { 'aria-label': 'Upload circle variant example' })}
7777
onClick={() => setIsUploading(!isUploading)}
78-
icon={<UploadIcon />}
78+
icon={<RhUiUploadIcon />}
7979
{...uploadingProps}
8080
/>
8181
</Flex>

packages/react-core/src/components/Button/examples/ButtonProgress.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from 'react';
22
import { Button, Flex } from '@patternfly/react-core';
3-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
3+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
44

55
interface LoadingPropsType {
66
spinnerAriaValueText: string;
@@ -59,7 +59,7 @@ export const ButtonProgress: React.FunctionComponent = () => {
5959
variant="plain"
6060
{...(!isUploading && { 'aria-label': 'Upload' })}
6161
onClick={() => setIsUploading(!isUploading)}
62-
icon={<UploadIcon />}
62+
icon={<RhUiUploadIcon />}
6363
{...uploadingProps}
6464
/>
6565
<br />

packages/react-core/src/components/FileUpload/examples/FileUpload.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ subsection: file-upload
77
---
88

99
import { useState } from 'react';
10-
import FileUploadIcon from '@patternfly/react-icons/dist/esm/icons/file-upload-icon';
10+
import RhUiDocumentFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-document-fill-icon';
1111

1212
## Examples
1313

@@ -21,13 +21,15 @@ Pressing _Clear_ button triggers `onClearClick` event.
2121
### Simple text file
2222

2323
```ts file="./FileUploadSimpleText.tsx"
24+
2425
```
2526

2627
### With helper text
2728

2829
You can pass in the `<FileUploadHelperText` sub-component via the `children` property to `<FileUpload>`.
2930

3031
```ts file="./FileUploadWithHelperText.tsx"
32+
3133
```
3234

3335
### Text file with edits allowed
@@ -36,6 +38,7 @@ A user can always type instead of selecting a file, but by default, once a user
3638
Typing/pasting text in the box will call `onTextChange` with a string, and a string value is expected for the `value` prop. :
3739

3840
```ts file="./FileUploadTextWithEdits.tsx"
41+
3942
```
4043

4144
### Restricting file size and type
@@ -49,6 +52,7 @@ Restricting file sizes and types in this way is for user convenience only, and i
4952
### Text file with restrictions
5053

5154
```ts file="./FileUploadTextWithRestrictions.tsx"
55+
5256
```
5357

5458
### Other file types
@@ -58,6 +62,7 @@ If no `type` prop is specified, the component will not read files directly. When
5862
### Simple file of any format
5963

6064
```ts file="./FileUploadSimpleFile.tsx"
65+
6166
```
6267

6368
### Customizing the file preview
@@ -67,6 +72,7 @@ Regardless of `type`, the preview area (the TextArea, or any future implementati
6772
### Custom file preview
6873

6974
```ts file="./FileUploadCustomPreview.tsx"
75+
7076
```
7177

7278
### Bringing your own file browse logic
@@ -78,6 +84,7 @@ Note that the `isLoading` prop is styled to position the spinner dead center abo
7884
### Custom file upload
7985

8086
```ts file="./FileUploadCustomUpload.tsx"
87+
8188
```
8289

8390
## Types

packages/react-core/src/components/FileUpload/examples/FileUploadCustomPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from 'react';
22
import { FileUpload } from '@patternfly/react-core';
3-
import FileUploadIcon from '@patternfly/react-icons/dist/esm/icons/file-upload-icon';
3+
import RhUiDocumentFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-document-fill-icon';
44

55
export const CustomPreviewFileUpload: React.FunctionComponent = () => {
66
const [value, setValue] = useState<File>();
@@ -29,7 +29,7 @@ export const CustomPreviewFileUpload: React.FunctionComponent = () => {
2929
>
3030
{value && (
3131
<div>
32-
<FileUploadIcon width="2em" height="2em" /> Custom preview here for your {value.size}-byte file named{' '}
32+
<RhUiDocumentFillIcon width="2em" height="2em" /> Custom preview here for your {value.size}-byte file named{' '}
3333
{value.name}
3434
</div>
3535
)}

packages/react-core/src/components/MultipleFileUpload/examples/MultipleFileUpload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ propComponents:
88
---
99

1010
import { useEffect, useState } from 'react';
11-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
11+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
1212

1313
Multiple file upload is able to:
1414

packages/react-core/src/components/MultipleFileUpload/examples/MultipleFileUploadBasic.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
HelperTextItem,
1010
DropEvent
1111
} from '@patternfly/react-core';
12-
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
12+
import RhUiUploadIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-upload-icon';
1313

1414
interface readFile {
1515
fileName: string;
@@ -124,7 +124,7 @@ export const MultipleFileUploadBasic: React.FunctionComponent = () => {
124124
isHorizontal={isHorizontal}
125125
>
126126
<MultipleFileUploadMain
127-
titleIcon={<UploadIcon />}
127+
titleIcon={<RhUiUploadIcon />}
128128
titleText="Drag and drop files here"
129129
titleTextSeparator="or"
130130
infoText="Accepted file types: JPEG, Doc, PDF, PNG"

packages/react-core/src/components/Toolbar/examples/Toolbar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ section: components
88
import { Fragment, useState, useLayoutEffect, useRef } from 'react';
99

1010
import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
11-
import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
11+
import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
1212
import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
1313
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
1414
import RhUiEllipsisVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon';

0 commit comments

Comments
 (0)