Skip to content

Commit 1fb8110

Browse files
committed
Drop types
1 parent cab6a80 commit 1fb8110

File tree

21 files changed

+102
-98
lines changed

21 files changed

+102
-98
lines changed

package-lock.json

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/module/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"@patternfly/documentation-framework": "^6.5.16",
4747
"@patternfly/react-code-editor": "^6.0.0",
4848
"@patternfly/patternfly": "^6.0.0",
49-
"@types/react": "^19.1.0",
50-
"@types/react-dom": "^19.1.2",
49+
"@types/react": "^18.2.33",
50+
"@types/react-dom": "^18.3.1",
5151
"react": "^18.3.1",
5252
"react-dom": "^18.3.1",
5353
"typescript": "^5.8.3"

packages/module/src/Ansible/Ansible.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { FunctionComponent, CSSProperties } from 'react';
1+
import type { HTMLAttributes, DetailedHTMLProps, FunctionComponent, CSSProperties } from 'react';
22
import { Fragment } from 'react';
33
import clsx from 'clsx';
44
import { createUseStyles } from 'react-jss';
55

6-
export interface AnsibleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
6+
export interface AnsibleProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> {
77
/** Supported/unsupported variant flag */
88
isSupported?: boolean;
99
/** Red Hat Ansible Automation Platform technology icon */

packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FunctionComponent } from 'react';
1+
import type { ReactNode, MouseEvent, FunctionComponent } from 'react';
22
import { useState } from 'react';
33
import {
44
Button,
@@ -20,7 +20,7 @@ export interface ColumnManagementModalColumn {
2020
/** Internal identifier of a column by which table displayed columns are filtered. */
2121
key: string;
2222
/** The actual display name of the column possibly with a tooltip or icon. */
23-
title: React.ReactNode;
23+
title: ReactNode,
2424
/** If user changes checkboxes, the component will send back column array with this property altered. */
2525
isShown?: boolean;
2626
/** Set to false if the column should be hidden initially */

packages/module/src/ContentHeader/ContentHeader.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { PropsWithChildren, FunctionComponent } from 'react';
1+
import type { ReactNode, PropsWithChildren, FunctionComponent } from 'react';
22
import {
33
Flex,
44
FlexItem,
@@ -24,19 +24,19 @@ export interface PageHeaderLinkProps extends ButtonProps {
2424

2525
export interface ContentHeaderProps {
2626
/** Title for content header */
27-
title: React.ReactNode;
27+
title: ReactNode;
2828
/** Optional subtitle for content header */
29-
subtitle?: React.ReactNode;
29+
subtitle?: ReactNode;
3030
/** Optional link below subtitle */
3131
linkProps?: PageHeaderLinkProps;
3232
/** Optional icon for content header (appears to the left of the content header's title with a divider) */
33-
icon?: React.ReactNode;
33+
icon?: ReactNode;
3434
/** Optional label for content header (appears to the right of the content header's title) */
35-
label?: React.ReactNode;
35+
label?: ReactNode;
3636
/** Breadcrumbs component */
37-
breadcrumbs?: React.ReactNode;
37+
breadcrumbs?: ReactNode;
3838
/** Menu that appears to the far right of the title */
39-
actionMenu?: React.ReactNode;
39+
actionMenu?: ReactNode;
4040
/** Custom OUIA ID */
4141
ouiaId?: string | number;
4242
}

packages/module/src/ErrorBoundary/ErrorBoundary.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FunctionComponent } from 'react';
1+
import type { ReactNode, FunctionComponent } from 'react';
22
import { Component } from 'react';
33
import { ExpandableSection, Title } from '@patternfly/react-core';
44
import { createUseStyles } from 'react-jss';
@@ -15,19 +15,19 @@ const useStyles = createUseStyles({
1515

1616
export interface ErrorBoundaryProps {
1717
/** The title text to display on the error page */
18-
headerTitle?: React.ReactNode;
18+
headerTitle?: ReactNode;
1919
/** Indicates if the error is silent */
2020
silent?: boolean;
2121
/** The title text to display with the error */
22-
errorTitle?: React.ReactNode;
22+
errorTitle?: ReactNode;
2323
/** The description text to display with the error */
24-
errorDescription?: React.ReactNode;
24+
errorDescription?: ReactNode;
2525
/** The default description text to display with the error if no errorDescription is provided */
26-
defaultErrorDescription?: React.ReactNode;
26+
defaultErrorDescription?: ReactNode;
2727
/** The text for the toggle link that users can select to view error details */
2828
errorToggleText?: string;
2929
/** The component that the error boundary component is wrapped around, which should be returned if there is no error */
30-
children?: React.ReactNode;
30+
children?: ReactNode;
3131
/** Custom OUIA ID */
3232
ouiaId?: string | number;
3333
/** The heading level to use on the header title, default is h1 */

packages/module/src/ErrorState/ErrorState.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
StackItem,
1111
} from '@patternfly/react-core';
1212
import { createUseStyles } from 'react-jss'
13-
import type { FunctionComponent } from 'react';
13+
import type { ReactNode, FunctionComponent } from 'react';
1414

1515
const useStyles = createUseStyles({
1616
errorDescription: {
@@ -21,13 +21,13 @@ const useStyles = createUseStyles({
2121
/** extends EmptyStateProps */
2222
export interface ErrorStateProps extends Omit<EmptyStateProps, 'children' | 'titleText' | 'status'> {
2323
/** Title of the error. */
24-
titleText?: React.ReactNode;
24+
titleText?: ReactNode;
2525
/** A description of the error, if no body text is provided then it will be set to the defaultBodyText. */
26-
bodyText?: React.ReactNode;
26+
bodyText?: ReactNode;
2727
/** A default description of the error used if no errorDescription is provided. */
28-
defaultBodyText?: React.ReactNode;
28+
defaultBodyText?: ReactNode;
2929
/** Custom footer content */
30-
customFooter?: React.ReactNode;
30+
customFooter?: ReactNode;
3131
/** ErrorState OUIA ID */
3232
ouiaId?: string | number;
3333
/** Status of the error message. */

packages/module/src/LogSnippet/LogSnippet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { FunctionComponent } from 'react';
1+
import type { ReactNode, FunctionComponent } from 'react';
22
import { Alert, AlertVariant, CodeBlock, CodeBlockCode, Flex, FlexItem, FlexProps } from '@patternfly/react-core';
33

44
/** extends FlexProps */
55
export interface LogSnippetProps extends FlexProps {
66
/** Log snippet or code to be displayed */
7-
logSnippet?: React.ReactNode;
7+
logSnippet?: ReactNode;
88
/** Message to appear above the log snippet */
9-
message: string | React.ReactNode;
9+
message: string | ReactNode;
1010
/** Log snippet alert variant */
1111
variant?: AlertVariant;
1212
/** Custom OUIA ID */

packages/module/src/Maintenance/Maintenance.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import type { FunctionComponent } from 'react';
1+
import type { ReactNode, FunctionComponent } from 'react';
22
import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateProps, EmptyStateStatus, EmptyStateVariant } from '@patternfly/react-core';
33
import { HourglassHalfIcon } from '@patternfly/react-icons';
44

55
/** extends EmptyStateProps */
66
export interface MaintenanceProps extends Omit<EmptyStateProps, 'children' | 'title'> {
77
/** The title for the maintenance message */
8-
titleText?: React.ReactNode;
8+
titleText?: ReactNode;
99
/** Custom body text */
10-
bodyText?: React.ReactNode;
10+
bodyText?: ReactNode;
1111
/** A default bodyText used if no bodyText is provided */
12-
defaultBodyText?: React.ReactNode;
12+
defaultBodyText?: ReactNode;
1313
/** Start time in a specific time zone */
14-
startTime?: React.ReactNode;
14+
startTime?: ReactNode;
1515
/** End time in a specific time zone */
16-
endTime?: React.ReactNode;
16+
endTime?: ReactNode;
1717
/** Time zone specification */
18-
timeZone?: React.ReactNode;
18+
timeZone?: ReactNode;
1919
/** Information link */
2020
redirectLinkUrl?: string;
2121
/** Information link title */
22-
redirectLinkText?: React.ReactNode;
22+
redirectLinkText?: ReactNode;
2323
/** Custom footer content */
24-
customFooter?: React.ReactNode;
24+
customFooter?: ReactNode;
2525
/** Custom OUIA ID */
2626
ouiaId?: string | number; }
2727

packages/module/src/MissingPage/MissingPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FunctionComponent } from 'react';
1+
import type { ReactNode, FunctionComponent } from 'react';
22
import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateProps, EmptyStateVariant } from '@patternfly/react-core';
33
import NotFoundIcon from '../NotFoundIcon';
44

@@ -7,11 +7,11 @@ export interface MissingPageProps extends Omit<EmptyStateProps, 'children' | 'ti
77
/** The URL that the home page link points to */
88
toHomePageUrl?: string;
99
/** The text label for the link that points back to the home page */
10-
toHomePageText?: React.ReactNode;
10+
toHomePageText?: ReactNode;
1111
/** The title for the invalid object message */
12-
titleText?: React.ReactNode;
12+
titleText?: ReactNode;
1313
/** The body text for the invalid object message */
14-
bodyText?: React.ReactNode;
14+
bodyText?: ReactNode;
1515
/** Custom OUIA ID */
1616
ouiaId?: string | number;
1717
}

0 commit comments

Comments
 (0)