Skip to content

Commit 33fe0de

Browse files
authored
Merge pull request #248 from redallen/fix/react-icons
fix(icons): use @patternfly/react-icons
2 parents 276c82e + 536fe98 commit 33fe0de

File tree

15 files changed

+26
-139
lines changed

15 files changed

+26
-139
lines changed

packages/pf4-component-mapper/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@babel/preset-react": "^7.0.0",
2424
"@data-driven-forms/react-form-renderer": "*",
2525
"@patternfly/react-core": "^3.104.0",
26+
"@patternfly/react-icons": "^3.14.23",
2627
"@semantic-release/git": "^7.0.5",
2728
"@semantic-release/npm": "^5.1.1",
2829
"babel-core": "^7.0.0-bridge.0",
@@ -88,8 +89,8 @@
8889
},
8990
"dependencies": {
9091
"@patternfly/patternfly-next": "^1.0.175",
91-
"react-select": "^3.0.4",
92-
"react-final-form-arrays": "2.0.3"
92+
"react-final-form-arrays": "2.0.3",
93+
"react-select": "^3.0.4"
9394
},
9495
"postpublish": "export RELEASE_DEMO=true"
9596
}

packages/pf4-component-mapper/src/form-fields/fieldArray/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React, { Fragment } from 'react';
22
import PropTypes from 'prop-types';
33
import { Grid, GridItem, Bullseye, FormHelperText } from '@patternfly/react-core';
44

5-
import CloseIcon from '../../icons/close-icon';
6-
import AddCircleOIcon from '../../icons/add-circle-o-icon';
5+
import CloseIcon from '@patternfly/react-icons/dist/js/icons/close-icon';
6+
import AddCircleOIcon from '@patternfly/react-icons/dist/js/icons/add-circle-o-icon';
77

88
import './final-form-array.scss';
99

packages/pf4-component-mapper/src/form-fields/select/clear-indicator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Button, ButtonVariant } from '@patternfly/react-core';
44

5-
import TimesCircleIcon from '../../icons/times-circle-icon';
5+
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
66

77
const ClearIndicator = ({
88
clearValue,

packages/pf4-component-mapper/src/form-fields/select/dropdown-indicator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33

4-
import CaretDownIcon from '../../icons/caret-down-icon';
5-
import CircleNotchIcon from '../../icons/circle-notch-icon';
4+
import CaretDownIcon from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
5+
import CircleNotchIcon from '@patternfly/react-icons/dist/js/icons/circle-notch-icon';
66

77
const DropdownIndicator = ({ selectProps: { isFetching }}) => isFetching ? <CircleNotchIcon className="spinning" /> : <CaretDownIcon />;
88

packages/pf4-component-mapper/src/form-fields/select/multi-value-remove.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { components } from 'react-select';
33

4-
import TimesCircleIcon from '../../icons/times-circle-icon';
4+
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
55

66
const MultiValueRemove = props => (
77
<components.MultiValueRemove { ...props }>

packages/pf4-component-mapper/src/form-fields/select/option.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { components } from 'react-select';
33
import PropTypes from 'prop-types';
44
import { Checkbox } from '@patternfly/react-core';
55

6-
import CheckIcon from '../../icons/check-icon';
6+
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
77

88
const Option = (props) => (
99
<div

packages/pf4-component-mapper/src/icons/add-circle-o-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/icons/caret-down-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/icons/check-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/icons/circle-notch-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/icons/close-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/icons/times-circle-icon.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/pf4-component-mapper/src/tests/field-array/__snapshots__/field-array.test.js.snap

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -550,29 +550,28 @@ exports[`FieldArray should render array field correctly 1`] = `
550550
>
551551
<AddCircleOIcon
552552
className="ddf-final-form-group-add-icon"
553+
color="currentColor"
554+
noVerticalAlign={false}
553555
onClick={[Function]}
556+
size="sm"
557+
title={null}
554558
>
555559
<svg
556-
aria-labelledby="icon-title-25"
560+
aria-hidden={true}
561+
aria-labelledby={null}
557562
className="ddf-final-form-group-add-icon"
558563
fill="currentColor"
559564
height="1em"
560565
onClick={[Function]}
561566
role="img"
562567
style={
563568
Object {
564-
"verticalAlign": "-0.375em",
569+
"verticalAlign": "-0.125em",
565570
}
566571
}
567-
tabIndex="0"
568572
viewBox="0 64 1024 1024"
569573
width="1em"
570574
>
571-
<title
572-
id="icon-title-25"
573-
>
574-
AddCircleOIcon
575-
</title>
576575
<path
577576
d="M512.059-73.143c-282.338 0-512.059 229.673-512.059 512.025 0 282.238 229.721 511.975 512.059 511.975 282.283 0 511.941-229.735 511.941-511.975 0.005-282.352-229.659-512.025-511.941-512.025zM512.059 826.523c-213.826 0-387.728-173.856-387.728-387.643 0-213.888 173.904-387.691 387.728-387.691 213.717 0 387.671 173.803 387.671 387.691 0.005 213.785-173.957 387.643-387.671 387.643zM726.283 506.777c-3.429 3.477-7.803 5.223-13.138 5.223h-128.005v128.007c0 5.333-1.739 9.71-5.218 13.138s-7.936 5.141-13.351 5.141h-109.143c-5.417 0-9.863-1.714-13.351-5.141-3.481-3.429-5.221-7.808-5.221-13.141v-128.005l-128.007-0.002c-5.333 0-9.71-1.737-13.138-5.218-3.426-3.477-5.141-7.934-5.141-13.351v-109.143c0-5.417 1.714-9.856 5.141-13.351 3.429-3.481 7.808-5.221 13.141-5.221l128.005 0.002v-128.009c0-5.335 1.744-9.707 5.225-13.134 3.477-3.429 7.927-5.145 13.344-5.145h109.143c5.417 0 9.858 1.717 13.351 5.145 3.477 3.429 5.223 7.803 5.223 13.138v128.002h128.007c5.335 0 9.707 1.742 13.134 5.225 3.429 3.477 5.145 7.927 5.145 13.344v109.143c0 5.417-1.717 9.863-5.145 13.351z"
578577
transform="rotate(180 0 512) scale(-1 1)"

packages/pf4-component-mapper/src/tests/field-array/field-array.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import toJson from 'enzyme-to-json';
44
import FormRenderer, { componentTypes as components } from '@data-driven-forms/react-form-renderer';
55
import { TextInput } from '@patternfly/react-core';
66

7-
import AddCircleOIcon from '../../icons/add-circle-o-icon';
8-
import CloseIcon from '../../icons/close-icon';
7+
import AddCircleOIcon from '@patternfly/react-icons/dist/js/icons/add-circle-o-icon';
8+
import CloseIcon from '@patternfly/react-icons/dist/js/icons/close-icon';
99
import { formFieldsMapper, layoutMapper } from '../../index';
1010

1111
describe('FieldArray', () => {

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,6 +2333,13 @@
23332333
dependencies:
23342334
"@fortawesome/free-brands-svg-icons" "^5.8.1"
23352335

2336+
"@patternfly/react-icons@^3.14.23":
2337+
version "3.14.23"
2338+
resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-3.14.23.tgz#f371207155d13fcdae07a8b0fe6b7b6cabfa0ef4"
2339+
integrity sha512-l1ji5Gv4LyrSarGwsEAPG9Nq/8wSCwyvWv7j7R3u1LJy4X27wLc6uorzfToAbdvaBeBjjCEf/UJQZCHHzwIOAw==
2340+
dependencies:
2341+
"@fortawesome/free-brands-svg-icons" "^5.8.1"
2342+
23362343
"@patternfly/react-styles@^3.2.2", "@patternfly/react-styles@^3.6.6":
23372344
version "3.6.6"
23382345
resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-3.6.6.tgz#d4b481fbd34adc28b3129842aea4834c384d4382"

0 commit comments

Comments
 (0)