Skip to content

Commit 8469282

Browse files
committed
chore(React19): Enable React19
1 parent 79a8b98 commit 8469282

File tree

114 files changed

+325
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+325
-323
lines changed

packages/module/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
"clsx": "^2.1.1"
3939
},
4040
"peerDependencies": {
41-
"react": "^17 || ^18",
42-
"react-dom": "^17 || ^18"
41+
"react": "^17 || ^18 || ^19",
42+
"react-dom": "^17 || ^18 || ^19"
4343
},
4444
"devDependencies": {
4545
"@patternfly/patternfly-a11y": "^5.1.0",
4646
"@patternfly/documentation-framework": "^6.5.16",
4747
"@patternfly/react-code-editor": "^6.0.0",
4848
"@patternfly/patternfly": "^6.0.0",
49-
"@types/react": "^18.2.33",
50-
"@types/react-dom": "^18.3.1",
49+
"@types/react": "^19.1.0",
50+
"@types/react-dom": "^19.1.2",
5151
"react": "^18.3.1",
5252
"react-dom": "^18.3.1",
5353
"typescript": "^5.8.3"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import type { FunctionComponent } from 'react';
22
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
33

4-
export const BasicExample: React.FunctionComponent = () => <Ansible />;
4+
export const BasicExample: FunctionComponent = () => <Ansible />;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react';
1+
import type { FunctionComponent } from 'react';
22
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
33

4-
export const BasicExample: React.FunctionComponent = () => (
4+
export const BasicExample: FunctionComponent = () => (
55
<Ansible isRHAAP/>
66
);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import type { FunctionComponent } from 'react';
22
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
33

4-
export const BasicExample: React.FunctionComponent = () => <Ansible isSupported={false} />;
4+
export const BasicExample: FunctionComponent = () => <Ansible isSupported={false} />;

packages/module/patternfly-docs/content/extensions/component-groups/examples/BulkSelect/BulkSelectAllExample.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import React, { useState } from 'react';
1+
import type { FunctionComponent } from 'react';
2+
import { useState } from 'react';
23
import { BulkSelect, BulkSelectValue } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect';
34

45
const allData = [ "Item 1", "Item 2" , "Item 3", "Item4", "Item 5" ];
56
const pageData = [ "Item 1", "Item 2" ];
67

7-
export const BasicExample: React.FunctionComponent = () => {
8+
export const BasicExample: FunctionComponent = () => {
89
const [ selected, setSelected ] = useState<string[]>(pageData);
910

1011
const handleBulkSelect = (value: BulkSelectValue) => {

packages/module/patternfly-docs/content/extensions/component-groups/examples/BulkSelect/BulkSelectExample.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import React, { useState } from 'react';
1+
import type { FunctionComponent } from 'react';
2+
import { useState } from 'react';
23
import { BulkSelect, BulkSelectValue } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect';
34

45
const allData = [ "Item 1", "Item 2" , "Item 3", "Item4", "Item 5" ];
56
const pageData = [ "Item 1", "Item 2" ];
67

7-
export const BasicExample: React.FunctionComponent = () => {
8+
export const BasicExample: FunctionComponent = () => {
89
const [ selected, setSelected ] = useState<string[]>([]);
910

1011
const handleBulkSelect = (value: BulkSelectValue) => {

packages/module/patternfly-docs/content/extensions/component-groups/examples/CloseButton/CloseButtonExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable no-console */
2-
import React from 'react'
2+
import type { FunctionComponent } from 'react';
33
import CloseButton from '@patternfly/react-component-groups/dist/dynamic/CloseButton';
44

5-
export const BasicExample: React.FunctionComponent = () => (
5+
export const BasicExample: FunctionComponent = () => (
66
<>
77
<CloseButton dataTestID="close-button-example" onClick={()=>{console.log('Close button clicked')}} style={{ float: 'none' }} />
88
</>

packages/module/patternfly-docs/content/extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModalExample.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React from 'react'
1+
import type { FunctionComponent } from 'react';
2+
import { useState } from 'react';
23
import { Button, ButtonVariant } from '@patternfly/react-core';
34
import { Table, Tbody, Td, Th, Tr, Thead } from '@patternfly/react-table';
45
import { ColumnsIcon } from '@patternfly/react-icons';
@@ -59,9 +60,9 @@ const ROWS = [
5960
}
6061
]
6162

62-
export const ColumnManagementModalExample: React.FunctionComponent = () => {
63-
const [ columns, setColumns ] = React.useState(DEFAULT_COLUMNS);
64-
const [ isOpen, setOpen ] = React.useState(false);
63+
export const ColumnManagementModalExample: FunctionComponent = () => {
64+
const [ columns, setColumns ] = useState(DEFAULT_COLUMNS);
65+
const [ isOpen, setOpen ] = useState(false);
6566

6667
return (
6768
<>

packages/module/patternfly-docs/content/extensions/component-groups/examples/ErrorBoundary/ErrorBoundaryExample.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import React, { useState } from 'react';
1+
import type { FunctionComponent } from 'react';
2+
import { useState } from 'react';
23
import { Title, Button, Card, CardBody, CardFooter, CardHeader } from '@patternfly/react-core';
34
import ErrorBoundary from '@patternfly/react-component-groups/dist/dynamic/ErrorBoundary';
45

5-
export const BasicExample: React.FunctionComponent = () => {
6+
export const BasicExample: FunctionComponent = () => {
67
const [ hasError, setHasError ] = useState(false);
78

89
const Surprise = () => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import type { FunctionComponent } from 'react';
22
import ErrorState from "@patternfly/react-component-groups/dist/dynamic/ErrorState";
33

4-
export const BasicExample: React.FunctionComponent = () => <ErrorState titleText='Sample error title' bodyText='Sample error description' />;
4+
export const BasicExample: FunctionComponent = () => <ErrorState titleText='Sample error title' bodyText='Sample error description' />;

0 commit comments

Comments
 (0)