Skip to content

Commit 2166f8e

Browse files
committed
feat(Icons): updated cog icons to rh settings
1 parent 911223a commit 2166f8e

30 files changed

+75
-67
lines changed

packages/react-code-editor/src/components/CodeEditor/examples/CodeEditor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Note: Code editor lives in its own package at [@patternfly/react-code-editor](ht
99

1010
import { Fragment, useState } from 'react';
1111
import { CodeEditor, CodeEditorControl, Language } from '@patternfly/react-code-editor';
12-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
12+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
1313
import HashtagIcon from '@patternfly/react-icons/dist/esm/icons/hashtag-icon';
1414
import MapIcon from '@patternfly/react-icons/dist/esm/icons/map-icon';
1515
import MoonIcon from '@patternfly/react-icons/dist/esm/icons/moon-icon';

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
1+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
22
import MapIcon from '@patternfly/react-icons/dist/esm/icons/map-icon';
33
import MoonIcon from '@patternfly/react-icons/dist/esm/icons/moon-icon';
44
import HashtagIcon from '@patternfly/react-icons/dist/esm/icons/hashtag-icon';
@@ -38,7 +38,7 @@ interface ConfigModalItemProps {
3838
}
3939

4040
const ConfigModalItem: React.FunctionComponent<ConfigModalItemProps> = ({
41-
icon = <CogIcon />,
41+
icon = <RhUiSettingsFillIcon />,
4242
description,
4343
title,
4444
id = `ConfigModalItem-${title.replace(/\s+/g, '-').toLowerCase()}`,
@@ -77,7 +77,7 @@ interface ConfigModalSwitchProps extends Omit<ConfigModalItemProps, 'slot'> {
7777
}
7878

7979
const ConfigModalSwitch: React.FunctionComponent<ConfigModalSwitchProps> = ({
80-
icon = <CogIcon />,
80+
icon = <RhUiSettingsFillIcon />,
8181
description,
8282
title,
8383
id = `ConfigModalSwitch-${title.replace(/\s+/g, '-').toLowerCase()}`,

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Fragment, useState } from 'react';
99
import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
1010
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
1111
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
12-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
12+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
1313
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
1414
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
1515
import RhUiWarningFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-fill-icon';
@@ -22,56 +22,65 @@ import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-
2222
### Basic
2323

2424
```ts file="IconBasic.tsx"
25+
2526
```
2627

2728
### Standalone icon sizes
2829

2930
These are the standard options for sizing icons.
3031

3132
```ts file="StandaloneIconSizes.tsx"
33+
3234
```
3335

3436
### Body sizes
3537

3638
These size options are meant to make icons match the size of body text.
3739

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

4144
### Heading sizes
4245

4346
These size options are meant to make icons match the size of heading text.
4447

4548
```ts file="HeadingIconSizes.tsx"
49+
4650
```
4751

4852
### Status colors
4953

5054
The following example demonstrates the various status variants of an icon. Keep in mind that these icons are displayed out of a typical context, and that you should not rely on color alone to convey status to users.
5155

5256
```ts file="IconStatus.tsx"
57+
5358
```
5459

5560
### Sizing an icon within the icon container
5661

5762
Providing both size and iconSize properties allows the icon container to maintain a consistent size, even if the icon changes in size.
5863

5964
```ts file="IconContentSizes.tsx"
65+
6066
```
6167

6268
### Inline
6369

6470
```ts file="IconInline.tsx"
71+
6572
```
6673

6774
### In progress
6875

6976
Passing the `isInProgress` property will swap the icon to a progress icon. By default this progress icon will be a `Spinner` but may be customized or overriden using the `progressIcon` property.
7077

7178
```ts file="IconProgress.tsx"
79+
7280
```
7381

7482
### Custom in progress icon
7583

7684
```ts file="IconCustomProgress.tsx"
85+
7786
```

packages/react-core/src/components/Icon/examples/IconBasic.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Icon } from '@patternfly/react-core';
33
import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
44
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
55
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
6-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
6+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
77

88
export const IconBasic: React.FunctionComponent = () => (
99
<Fragment>
@@ -17,7 +17,7 @@ export const IconBasic: React.FunctionComponent = () => (
1717
<RhMicronsCaretDownIcon />
1818
</Icon>{' '}
1919
<Icon>
20-
<CogIcon />
20+
<RhUiSettingsFillIcon />
2121
</Icon>
2222
</Fragment>
2323
);

packages/react-core/src/components/MenuToggle/MenuToggle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styles from '@patternfly/react-styles/css/components/MenuToggle/menu-togg
33
import { css } from '@patternfly/react-styles';
44
import CaretDownIcon from '@patternfly/react-icons/dist/esm/icons/caret-down-icon';
55
import { BadgeProps } from '../Badge';
6-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
6+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
77
import RhUiCheckCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-fill-icon';
88
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
99
import RhUiWarningFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-fill-icon';
@@ -150,7 +150,7 @@ class MenuToggleBase extends Component<MenuToggleProps> {
150150
const content = (
151151
<>
152152
{(icon || isSettings) && (
153-
<span className={css(styles.menuToggleIcon)}>{isSettings ? <CogIcon /> : icon}</span>
153+
<span className={css(styles.menuToggleIcon)}>{isSettings ? <RhUiSettingsFillIcon /> : icon}</span>
154154
)}
155155
{isTypeahead ? children : children && <span className={css(styles.menuToggleText)}>{children}</span>}
156156
{isValidElement(badge) && <span className={css(styles.menuToggleCount)}>{badge}</span>}

packages/react-core/src/components/MenuToggle/__tests__/MenuToggle.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MenuToggle } from '../MenuToggle';
22
import { MenuToggleCheckbox } from '../MenuToggleCheckbox';
33
import { Badge } from '../../Badge';
4-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
4+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
55
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
66
import userEvent from '@testing-library/user-event';
77
import { render, screen } from '@testing-library/react';
@@ -45,7 +45,7 @@ describe('Old Snapshot tests - remove when refactoring', () => {
4545
});
4646

4747
test('shows icon', () => {
48-
const { asFragment } = render(<MenuToggle icon={<CogIcon />}>Toggle</MenuToggle>);
48+
const { asFragment } = render(<MenuToggle icon={<RhUiSettingsFillIcon />}>Toggle</MenuToggle>);
4949
expect(asFragment()).toMatchSnapshot();
5050
});
5151

packages/react-core/src/components/MenuToggle/__tests__/__snapshots__/MenuToggle.test.tsx.snap

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -184,24 +184,12 @@ exports[`Old Snapshot tests - remove when refactoring shows icon 1`] = `
184184
fill="currentColor"
185185
height="1em"
186186
role="img"
187+
viewBox="0 0 32 32"
187188
width="1em"
188189
>
189-
<svg
190-
class="pf-v6-icon-default"
191-
viewBox="0 0 512 512"
192-
>
193-
<path
194-
d="M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"
195-
/>
196-
</svg>
197-
<svg
198-
class="pf-v6-icon-rh-ui"
199-
viewBox="0 0 32 32"
200-
>
201-
<path
202-
d="M16 11c-2.757 0-5 2.243-5 5s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5Zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3 3 1.346 3 3-1.346 3-3 3Zm14.657-6.211c-.1-.46-.507-.789-.978-.789h-2.373c-.141-.4-.302-.791-.481-1.168l1.677-1.676a1 1 0 0 0 .134-1.249 15.23 15.23 0 0 0-4.543-4.542 1 1 0 0 0-1.248.134l-1.677 1.676c-.378-.18-.768-.341-1.168-.481V2.32a1 1 0 0 0-.788-.978 15.32 15.32 0 0 0-6.424 0A1 1 0 0 0 12 2.32v2.374c-.4.141-.79.302-1.168.481L9.155 3.499a1 1 0 0 0-1.248-.134 15.246 15.246 0 0 0-4.543 4.541 1 1 0 0 0 .134 1.249l1.677 1.676c-.18.378-.341.769-.481 1.168H2.321a1 1 0 0 0-.978.789 15.17 15.17 0 0 0 0 6.422c.1.46.507.789.978.789h2.373c.141.4.302.791.481 1.168l-1.677 1.676a1 1 0 0 0-.134 1.249 15.253 15.253 0 0 0 4.543 4.542 1 1 0 0 0 1.248-.134l1.677-1.676c.378.18.768.341 1.168.481v2.374a1 1 0 0 0 .788.978 15.23 15.23 0 0 0 6.424 0 1 1 0 0 0 .788-.978v-2.374c.4-.141.79-.302 1.168-.481l1.677 1.676a1 1 0 0 0 1.248.134 15.2 15.2 0 0 0 4.543-4.542 1 1 0 0 0-.134-1.249l-1.677-1.676c.18-.378.341-.769.481-1.168h2.373a1 1 0 0 0 .978-.789 15.177 15.177 0 0 0 0-6.422ZM28.848 18h-2.272a1 1 0 0 0-.962.727 9.963 9.963 0 0 1-.885 2.144 1 1 0 0 0 .166 1.195l1.604 1.604a13.234 13.234 0 0 1-2.828 2.829l-1.604-1.604a1 1 0 0 0-1.195-.166 9.96 9.96 0 0 1-2.144.884 1 1 0 0 0-.728.962v2.273a13.277 13.277 0 0 1-4 0v-2.273a1 1 0 0 0-.728-.962 9.96 9.96 0 0 1-2.144-.884 1.001 1.001 0 0 0-1.195.166l-1.604 1.604a13.196 13.196 0 0 1-2.828-2.829l1.604-1.604c.316-.316.384-.805.166-1.195a9.963 9.963 0 0 1-.885-2.144A1 1 0 0 0 5.424 18H3.152a13.126 13.126 0 0 1 0-4h2.272a1 1 0 0 0 .962-.727 9.963 9.963 0 0 1 .885-2.144 1 1 0 0 0-.166-1.195L5.501 8.33a13.163 13.163 0 0 1 2.828-2.829l1.604 1.604c.316.316.805.383 1.195.166a9.96 9.96 0 0 1 2.144-.884A1 1 0 0 0 14 5.425V3.152a13.277 13.277 0 0 1 4 0v2.273a1 1 0 0 0 .728.962 9.96 9.96 0 0 1 2.144.884 1 1 0 0 0 1.195-.166l1.604-1.604a13.196 13.196 0 0 1 2.828 2.828l-1.604 1.604a1.001 1.001 0 0 0-.166 1.195c.372.665.67 1.386.885 2.144a1 1 0 0 0 .962.727h2.272a13.245 13.245 0 0 1 0 4Z"
203-
/>
204-
</svg>
190+
<path
191+
d="M30.168 12.894a.5.5 0 0 0-.488-.394h-2.732a11.512 11.512 0 0 0-.729-1.769l1.931-1.93a.5.5 0 0 0 .066-.625 14.693 14.693 0 0 0-4.393-4.392.498.498 0 0 0-.624.067l-1.93 1.93a11.512 11.512 0 0 0-1.769-.729V2.319a.5.5 0 0 0-.395-.489 14.81 14.81 0 0 0-6.211 0 .5.5 0 0 0-.395.489v2.733c-.614.196-1.207.439-1.769.729L8.8 3.851a.498.498 0 0 0-.624-.067 14.714 14.714 0 0 0-4.393 4.392.5.5 0 0 0 .066.625l1.931 1.93a11.512 11.512 0 0 0-.729 1.769H2.319a.5.5 0 0 0-.488.394 14.652 14.652 0 0 0 0 6.212.5.5 0 0 0 .488.394h2.732c.196.615.44 1.207.729 1.769l-1.931 1.93a.5.5 0 0 0-.066.625 14.673 14.673 0 0 0 4.393 4.392.498.498 0 0 0 .624-.067l1.93-1.93c.562.289 1.154.533 1.769.729v2.733a.5.5 0 0 0 .395.489 14.686 14.686 0 0 0 6.21 0 .5.5 0 0 0 .395-.489v-2.733a11.454 11.454 0 0 0 1.769-.729l1.93 1.93a.5.5 0 0 0 .624.067 14.714 14.714 0 0 0 4.393-4.392.5.5 0 0 0-.066-.625l-1.931-1.93c.289-.562.533-1.154.729-1.769h2.732a.5.5 0 0 0 .488-.394 14.652 14.652 0 0 0 0-6.212ZM16 21.25c-2.895 0-5.25-2.355-5.25-5.25s2.355-5.25 5.25-5.25 5.25 2.355 5.25 5.25-2.355 5.25-5.25 5.25Z"
192+
/>
205193
</svg>
206194
</span>
207195
<span

packages/react-core/src/demos/CustomMenus/CustomMenus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ subsection: menus
66

77
import { cloneElement, Fragment, useEffect, useRef, useState } from 'react';
88

9-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
9+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
1010
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
1111
import TableIcon from '@patternfly/react-icons/dist/esm/icons/table-icon';
1212
import StorageDomainIcon from '@patternfly/react-icons/dist/esm/icons/storage-domain-icon';

packages/react-core/src/demos/DashboardHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
ToolbarItem,
2424
PageToggleButton
2525
} from '../components';
26-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
26+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
2727
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
2828
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
2929
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
@@ -87,7 +87,7 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
8787
const kebabDropdownItems = (
8888
<>
8989
<DropdownItem>
90-
<CogIcon /> Settings
90+
<RhUiSettingsFillIcon /> Settings
9191
</DropdownItem>
9292
<DropdownItem>
9393
<HelpIcon /> Help

packages/react-core/src/demos/Masthead.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { cloneElement, Fragment, useEffect, useRef, useState } from 'react';
77
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
88
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
99
import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
10-
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
10+
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
1111
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
1212
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
1313
import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
@@ -24,7 +24,9 @@ Many mastheads contain utilities which collapse into a dropdown at smaller viewp
2424
```ts file='./examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx' isFullscreen
2525

2626
```
27+
2728
### Horizontal nav
29+
2830
```ts file='./examples/Masthead/MastheadWithHorizontalNav.tsx' isFullscreen
2931

30-
```
32+
```

0 commit comments

Comments
 (0)