Skip to content

Commit 34a9654

Browse files
committed
feat(icon-generator): rebase
1 parent f9674bd commit 34a9654

File tree

12 files changed

+40
-36
lines changed

12 files changed

+40
-36
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Please ensure that all React UI components contributed meet the following guidel
159159
### Code consistency
160160

161161
- All files and folders under your package's `src/components` should name with PascalCase except `index.js` files
162-
- If you need a constant file, it should be called `{Component_Name}constants.js` (Component_Name with PascalCase)
162+
- If you need a constant file, it should be called `{Component_Name}Constants.js` (Component_Name with PascalCase)
163163
- Each component should treat as a standalone package and live under its own folder. If you think your component can be made completely independent from other components, create it as a new package. This reduces the dependency tree and improves performance downstream. It also makes exported bundles lighter.
164164
- Single file per component with **default export**
165165
- Avoid using the bindMethods syntax for attaching methods to a class. Instead use class properties for example `testMethod = () => { return 'test'}`
@@ -329,5 +329,4 @@ The process for revoking someone's maintainer status is a discussion limited to
329329

330330
[1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
331331
[2]: mailto:patternfly@redhat.com
332-
[3]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type
333-
332+
[3]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as React from 'react';
21
import styles from '@patternfly/react-styles/css/components/Icon/icon';
32
import { css } from '@patternfly/react-styles';
43
import { Spinner } from '../Spinner';

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as React from 'react';
21
import { render, screen } from '@testing-library/react';
32
import { kebabCase } from 'case-anything';
43
import { Icon, IconSize } from '../Icon';
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon } from '@patternfly/react-core';
33
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
44

55
export const BodyIconSizes: React.FunctionComponent = () => (
6-
<React.Fragment>
6+
<Fragment>
77
<Icon size="bodySm">
88
<PlusCircleIcon />
99
</Icon>{' '}
@@ -13,5 +13,5 @@ export const BodyIconSizes: React.FunctionComponent = () => (
1313
<Icon size="bodyLg">
1414
<PlusCircleIcon />
1515
</Icon>
16-
</React.Fragment>
16+
</Fragment>
1717
);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon } from '@patternfly/react-core';
33
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
44

55
export const HeadingIconSizes: React.FunctionComponent = () => (
6-
<React.Fragment>
6+
<Fragment>
77
<Icon size="headingSm">
88
<PlusCircleIcon />
99
</Icon>{' '}
@@ -22,5 +22,5 @@ export const HeadingIconSizes: React.FunctionComponent = () => (
2222
<Icon size="heading_3xl">
2323
<PlusCircleIcon />
2424
</Icon>
25-
</React.Fragment>
25+
</Fragment>
2626
);

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cssPrefix: pf-v6-c-icon
55
propComponents: ['Icon']
66
---
77

8+
import { Fragment, useState } from 'react';
89
import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
910
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
1011
import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
@@ -74,9 +75,3 @@ Passing the `isInProgress` property will swap the icon to a progress icon. By de
7475

7576
```ts file="IconCustomProgress.tsx"
7677
```
77-
78-
### Custom in progress icon
79-
80-
```
81-
{console.log('here')}
82-
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon } from '@patternfly/react-core';
33
import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
44
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
55
import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
66
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
77

88
export const IconBasic: React.FunctionComponent = () => (
9-
<React.Fragment>
9+
<Fragment>
1010
<Icon>
1111
<LongArrowAltDownIcon />
1212
</Icon>{' '}
@@ -19,5 +19,5 @@ export const IconBasic: React.FunctionComponent = () => (
1919
<Icon>
2020
<CogIcon />
2121
</Icon>
22-
</React.Fragment>
22+
</Fragment>
2323
);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon } from '@patternfly/react-core';
33
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
44

55
export const IconContentSizes: React.FunctionComponent = () => (
6-
<React.Fragment>
6+
<Fragment>
77
<Icon size="3xl" iconSize="lg">
88
<PlusCircleIcon />
99
</Icon>{' '}
@@ -16,5 +16,5 @@ export const IconContentSizes: React.FunctionComponent = () => (
1616
<Icon size="3xl">
1717
<PlusCircleIcon />
1818
</Icon>
19-
</React.Fragment>
19+
</Fragment>
2020
);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon, Spinner, Checkbox } from '@patternfly/react-core';
33
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
44

55
export const IconProgress: React.FunctionComponent = () => {
6-
const [isInProgress, setIsInProgress] = React.useState<boolean>(false);
6+
const [isInProgress, setIsInProgress] = useState<boolean>(false);
77
return (
8-
<React.Fragment>
8+
<Fragment>
99
<div style={{ marginBottom: '12px' }}>
1010
<Checkbox
1111
label="Toggle in progress state"
@@ -19,6 +19,6 @@ export const IconProgress: React.FunctionComponent = () => {
1919
<Icon isInProgress={isInProgress} progressIcon={<Spinner diameter="2em" aria-label="Loading..." />}>
2020
<CheckCircleIcon />
2121
</Icon>
22-
</React.Fragment>
22+
</Fragment>
2323
);
2424
};

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from 'react';
1+
import { Fragment } from 'react';
22
import { Icon, Content } from '@patternfly/react-core';
33
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
44

55
export const IconInline: React.FunctionComponent = () => (
6-
<React.Fragment>
6+
<Fragment>
77
<Content>
88
<h1>
99
Heading
@@ -56,5 +56,5 @@ export const IconInline: React.FunctionComponent = () => (
5656
</Icon>
5757
extra large
5858
</Content>
59-
</React.Fragment>
59+
</Fragment>
6060
);

0 commit comments

Comments
 (0)