diff --git a/packages/module/src/Battery/Battery.tsx b/packages/module/src/Battery/Battery.tsx index 3594affd..be7e7155 100644 --- a/packages/module/src/Battery/Battery.tsx +++ b/packages/module/src/Battery/Battery.tsx @@ -9,31 +9,31 @@ import { createUseStyles } from 'react-jss' const batteryDefault = { '& svg': { - '& path': { fill: 'var(--pf-global--disabled-color--200)' } + '& path': { fill: 'var(--pf-v5-global--disabled-color--200)' } } }; const batteryLow = { '& svg': { - '& path': { fill: 'var(--pf-global--success-color--100)' } + '& path': { fill: 'var(--pf-v5-global--success-color--100)' } } }; const batteryMedium = { '& svg': { - '& path': { fill: 'var(--pf-global--warning-color--100)' } + '& path': { fill: 'var(--pf-v5-global--warning-color--100)' } } }; const batteryHigh = { '& svg': { - '& path': { fill: 'var(--pf-global--palette--orange-300)' } + '& path': { fill: 'var(--pf-v5-global--palette--orange-300)' } } }; const batteryCritical = { '& svg': { - '& path': { fill: 'var(--pf-global--danger-color--100)' } + '& path': { fill: 'var(--pf-v5-global--danger-color--100)' } } }; @@ -43,7 +43,7 @@ const useStyles = createUseStyles({ 'line-height': 0, '& svg': { position: 'relative', - top: 'var(--pf-global--spacer--sm)', + top: 'var(--pf-v5-global--spacer--sm)', height: '1.75rem' } }, diff --git a/packages/module/src/DetailsPageHeader/utils/ActionMenu.tsx b/packages/module/src/DetailsPageHeader/utils/ActionMenu.tsx index c22ad56d..b5612cfc 100644 --- a/packages/module/src/DetailsPageHeader/utils/ActionMenu.tsx +++ b/packages/module/src/DetailsPageHeader/utils/ActionMenu.tsx @@ -76,7 +76,7 @@ const useStyles = createUseStyles({ justifyContent: 'left' }, '.pf-c-dropdown__menu-item-icon': { - marginLeft: 'var(--pf-c-dropdown__menu-item-icon--MarginRight)' + marginLeft: 'var(--pf-v5-c-dropdown__menu-item-icon--MarginRight)' }, '.pf-c-dropdown__menu-item-main': { flexDirection: 'row-reverse', diff --git a/packages/module/src/ErrorBoundary/ErrorBoundary.tsx b/packages/module/src/ErrorBoundary/ErrorBoundary.tsx index 40b3f355..b991e091 100644 --- a/packages/module/src/ErrorBoundary/ErrorBoundary.tsx +++ b/packages/module/src/ErrorBoundary/ErrorBoundary.tsx @@ -28,7 +28,7 @@ interface ErrorPageState { } // As of time of writing, React only supports error boundaries in class components -class ErrorBoundary extends React.Component { +class ErrorBoundary extends React.Component, ErrorPageState> { constructor(props: Readonly) { super(props); this.state = { diff --git a/packages/module/src/ErrorBoundary/ErrorStack.tsx b/packages/module/src/ErrorBoundary/ErrorStack.tsx index 72fbd590..3249938f 100644 --- a/packages/module/src/ErrorBoundary/ErrorStack.tsx +++ b/packages/module/src/ErrorBoundary/ErrorStack.tsx @@ -9,13 +9,13 @@ interface ErrorStackProps { const useStyles = createUseStyles({ errorStack: { fontFamily: 'monospace', - fontSize: 'var(--pf-global--icon--FontSize--md)', + fontSize: 'var(--pf-v5-global--icon--FontSize--md)', textAlign: 'left', backgroundColor: 'white', borderStyle: 'solid', - borderColor: 'var(--pf-global--BackgroundColor--dark-300)', + borderColor: 'var(--pf-v5-global--BackgroundColor--dark-300)', overflowWrap: 'break-word', - padding: 'var(--pf-global--spacer--sm)' + padding: 'var(--pf-v5-global--spacer--sm)' }, }) diff --git a/packages/module/src/ErrorState/ErrorState.tsx b/packages/module/src/ErrorState/ErrorState.tsx index 4f0674cd..a9ff8627 100644 --- a/packages/module/src/ErrorState/ErrorState.tsx +++ b/packages/module/src/ErrorState/ErrorState.tsx @@ -3,18 +3,20 @@ import { Button, EmptyState, EmptyStateBody, + EmptyStateFooter, + EmptyStateHeader, EmptyStateIcon, EmptyStateProps, EmptyStateVariant, Stack, - StackItem, EmptyStateHeader, EmptyStateFooter, + StackItem, } from '@patternfly/react-core'; import { createUseStyles } from 'react-jss' import React from 'react'; const useStyles = createUseStyles({ errorIcon: { - fill: 'var(--pf-global--danger-color--100)', + fill: 'var(--pf-v5-global--danger-color--100)', }, }) @@ -36,7 +38,8 @@ const ErrorState: React.FunctionComponent = ({ errorTitle = 'So {errorDescription ? {errorDescription} : defaultErrorDescription} - + + {document.referrer ? ( )} - + + ); } diff --git a/packages/module/src/NotAuthorized/NotAuthorized.tsx b/packages/module/src/NotAuthorized/NotAuthorized.tsx index 111fb302..a0635263 100644 --- a/packages/module/src/NotAuthorized/NotAuthorized.tsx +++ b/packages/module/src/NotAuthorized/NotAuthorized.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Button, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateProps, EmptyStateVariant, EmptyStateHeader, EmptyStateFooter, } from '@patternfly/react-core'; +import { Button, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateProps, EmptyStateVariant, EmptyStateHeader, EmptyStateFooter, EmptyStateActions, } from '@patternfly/react-core'; import { LockIcon } from '@patternfly/react-icons'; export interface NotAuthorizedProps extends Omit { @@ -40,19 +40,23 @@ export const NotAuthorized: React.FunctionComponent = ({ }: NotAuthorizedProps) => ( {title}} icon={} headingLevel="h5" /> - {description} - {actions} - {showReturnButton && - (document.referrer ? ( - - ) : ( - - ))} - + {description} + + {actions && {actions}} + + {showReturnButton && + (document.referrer ? ( + + ) : ( + + ))} + + + ); diff --git a/packages/module/src/NotAuthorized/__snapshots__/NotAuthorized.test.tsx.snap b/packages/module/src/NotAuthorized/__snapshots__/NotAuthorized.test.tsx.snap index 4502062a..46cb25fc 100644 --- a/packages/module/src/NotAuthorized/__snapshots__/NotAuthorized.test.tsx.snap +++ b/packages/module/src/NotAuthorized/__snapshots__/NotAuthorized.test.tsx.snap @@ -45,16 +45,20 @@ exports[`NotAuthorized component should apply custom styles 1`] = ` @@ -104,7 +108,11 @@ exports[`NotAuthorized component should not show buttons 1`] = ` `; @@ -154,16 +162,20 @@ exports[`NotAuthorized component should render 1`] = ` @@ -214,26 +226,34 @@ exports[`NotAuthorized component should show custom actions 1`] = ` + @@ -284,16 +304,20 @@ exports[`NotAuthorized component should show custom description 1`] = ` @@ -344,16 +368,20 @@ exports[`NotAuthorized component should show custom title 1`] = ` @@ -404,16 +432,20 @@ exports[`NotAuthorized component should use custom icon 1`] = `