From c4e0a692257f32e6495ad3a499c9102fee0d3c33 Mon Sep 17 00:00:00 2001 From: Eric Olkowski Date: Tue, 3 Dec 2024 09:03:17 -0500 Subject: [PATCH] chore(Modal): updated deprecated usage to promoted version --- .../src/components/AboutModal/AboutModal.tsx | 4 +- .../examples/DateTimePickerInModal.tsx | 52 ++++++++++++------- .../MultipleFileUploadRejectedFile.tsx | 20 +++---- .../demos/WizardDemo/WizardDemo.tsx | 16 ++---- 4 files changed, 48 insertions(+), 44 deletions(-) diff --git a/packages/react-core/src/components/AboutModal/AboutModal.tsx b/packages/react-core/src/components/AboutModal/AboutModal.tsx index e254f889a04..8b077697215 100644 --- a/packages/react-core/src/components/AboutModal/AboutModal.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModal.tsx @@ -6,7 +6,7 @@ import { AboutModalBoxHeader } from './AboutModalBoxHeader'; import { AboutModalBoxBrand } from './AboutModalBoxBrand'; import { AboutModalBoxCloseButton } from './AboutModalBoxCloseButton'; import { AboutModalBox } from './AboutModalBox'; -import { Modal, ModalVariant } from '../../deprecated/components/Modal'; +import { Modal, ModalVariant } from '../Modal'; import { GenerateId } from '../../helpers/GenerateId/GenerateId'; export interface AboutModalProps extends React.HTMLProps { @@ -82,10 +82,8 @@ export const AboutModal: React.FunctionComponent = ({ {...(productName && { 'aria-labelledby': ariaLabelledBy })} aria-label={ariaLabel} onEscapePress={onClose} - showClose={false} appendTo={appendTo} disableFocusTrap={disableFocusTrap} - hasNoBodyWrapper > { const [isModalOpen, setIsModalOpen] = React.useState(false); @@ -26,31 +36,37 @@ export const SimpleModal = () => { - + + + + + document.body} /> + + + document.body} + isOpen={isTimePickerOpen} + setIsOpen={setIsTimePickerOpen} + /> + + + + , + - ]} - > - - - document.getElementById('date-time-picker-modal')} /> - - - - - - + + ); }; diff --git a/packages/react-core/src/demos/examples/MultipleFileUpload/MultipleFileUploadRejectedFile.tsx b/packages/react-core/src/demos/examples/MultipleFileUpload/MultipleFileUploadRejectedFile.tsx index 2013044df0b..f774ddabd3d 100644 --- a/packages/react-core/src/demos/examples/MultipleFileUpload/MultipleFileUploadRejectedFile.tsx +++ b/packages/react-core/src/demos/examples/MultipleFileUpload/MultipleFileUploadRejectedFile.tsx @@ -6,9 +6,11 @@ import { MultipleFileUploadStatus, MultipleFileUploadStatusItem, Checkbox, - DropEvent + DropEvent, + Modal, + ModalHeader, + ModalBody } from '@patternfly/react-core'; -import { Modal as ModalDeprecated } from '@patternfly/react-core/deprecated'; import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; interface readFile { @@ -135,16 +137,10 @@ export const MultipleFileUploadBasic: React.FunctionComponent = () => { ))} )} - setModalText('')} - > - {modalText} - + setModalText('')}> + + {modalText} + , Wizard - + , Wizard

Step 5

-
+

@@ -263,12 +262,7 @@ class WizardDemo extends React.Component, Wizard - + , Wizard - + ); }