Skip to content

Commit d25461c

Browse files
fix(EyeIcon): Replace EyeIcon with RhUiViewFillIcon (#12473)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b786d6d commit d25461c

4 files changed

Lines changed: 9 additions & 21 deletions

File tree

packages/react-core/src/components/LoginPage/LoginForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Button } from '../Button';
55
import { Checkbox } from '../Checkbox';
66
import { ValidatedOptions } from '../../helpers/constants';
77
import { InputGroup, InputGroupItem } from '../InputGroup';
8+
import RhUiViewFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-view-fill-icon';
89
import EyeSlashIcon from '@patternfly/react-icons/dist/esm/icons/eye-slash-icon';
9-
import EyeIcon from '@patternfly/react-icons/dist/esm/icons/eye-icon';
1010
import { HelperText, HelperTextItem } from '../HelperText';
1111

1212
export interface LoginFormProps extends Omit<React.HTMLProps<HTMLFormElement>, 'ref'> {
@@ -130,7 +130,7 @@ export const LoginForm: React.FunctionComponent<LoginFormProps> = ({
130130
variant="control"
131131
onClick={() => setPasswordHidden(!passwordHidden)}
132132
aria-label={passwordHidden ? showPasswordAriaLabel : hidePasswordAriaLabel}
133-
icon={passwordHidden ? <EyeIcon /> : <EyeSlashIcon />}
133+
icon={passwordHidden ? <RhUiViewFillIcon /> : <EyeSlashIcon />}
134134
/>
135135
</InputGroupItem>
136136
</InputGroup>

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

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -269,24 +269,12 @@ exports[`LoginForm LoginForm with show password 1`] = `
269269
fill="currentColor"
270270
height="1em"
271271
role="img"
272+
viewBox="0 0 32 32"
272273
width="1em"
273274
>
274-
<svg
275-
class="pf-v6-icon-default"
276-
viewBox="0 0 576 512"
277-
>
278-
<path
279-
d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"
280-
/>
281-
</svg>
282-
<svg
283-
class="pf-v6-icon-rh-ui"
284-
viewBox="0 0 32 32"
285-
>
286-
<path
287-
d="M16 10c-3.309 0-6 2.691-6 6s2.691 6 6 6 6-2.691 6-6-2.691-6-6-6Zm0 10c-2.206 0-4-1.794-4-4s1.794-4 4-4 4 1.794 4 4-1.794 4-4 4Zm14.79-4.665C30.009 13.776 25.625 6 16 6S1.991 13.776 1.209 15.336a1.472 1.472 0 0 0 0 1.328c.781 1.559 5.165 9.335 14.79 9.335s14.009-7.776 14.791-9.336a1.474 1.474 0 0 0 0-1.329ZM16 24c-8.049 0-11.937-6.222-12.882-8C4.064 14.222 7.951 8 16 8s11.938 6.224 12.882 8c-.946 1.778-4.833 8-12.882 8Z"
288-
/>
289-
</svg>
275+
<path
276+
d="M30.566 15.447C29.796 13.911 25.478 6.25 16 6.25S2.203 13.911 1.433 15.448a1.226 1.226 0 0 0 0 1.104c.77 1.536 5.088 9.197 14.566 9.197s13.797-7.661 14.567-9.198a1.226 1.226 0 0 0 0-1.104ZM16 21a5 5 0 1 1 .001-10.001A5 5 0 0 1 16 21Z"
277+
/>
290278
</svg>
291279
</span>
292280
</button>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ section: patterns
55

66
import { useEffect, useRef, useState } from 'react';
77
import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
8-
import EyeIcon from '@patternfly/react-icons/dist/esm/icons/eye-icon';
8+
import RhUiViewFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-view-fill-icon';
99
import EyeSlashIcon from '@patternfly/react-icons/dist/esm/icons/eye-slash-icon';
1010

1111
## Demos

packages/react-core/src/demos/PasswordGenerator/examples/PasswordGenerator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
MenuItemAction
1313
} from '@patternfly/react-core';
1414
import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
15-
import EyeIcon from '@patternfly/react-icons/dist/esm/icons/eye-icon';
15+
import RhUiViewFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-view-fill-icon';
1616
import EyeSlashIcon from '@patternfly/react-icons/dist/esm/icons/eye-slash-icon';
1717

1818
export const PasswordGenerator: React.FunctionComponent = () => {
@@ -123,7 +123,7 @@ export const PasswordGenerator: React.FunctionComponent = () => {
123123
variant="control"
124124
onClick={() => setPasswordHidden(!passwordHidden)}
125125
aria-label={passwordHidden ? 'Show password' : 'Hide password'}
126-
icon={passwordHidden ? <EyeIcon /> : <EyeSlashIcon />}
126+
icon={passwordHidden ? <RhUiViewFillIcon /> : <EyeSlashIcon />}
127127
/>
128128
</InputGroupItem>
129129
</InputGroup>

0 commit comments

Comments
 (0)