Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Modal/examples/Modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Basic modals give users the option to either confirm or cancel an action.

To flag an open modal, use the `isOpen` property. To execute a callback when a modal is closed, use the `onClose` property.

A modal must have a `<ModalBody>`, containing the main content of the modal. The `<ModalHeader>` and `<ModalFooter>` components are not required, but are typically used to display the modal title and any button actions, respectively.
The `<ModalBody>`, `<ModalHeader>`, and `<ModalFooter>` components are not required, but are typically used to display the main content of the modal, modal title, and any button actions, respectively.

```ts file="./ModalBasic.tsx"

Expand Down
3 changes: 2 additions & 1 deletion packages/react-core/src/components/Wizard/examples/Wizard.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ DrawerColorVariant,
DrawerHead,
DrawerActions,
DrawerCloseButton,
Modal,
ModalVariant,
Wizard,
WizardFooter,
WizardFooterWrapper,
Expand All @@ -46,7 +48,6 @@ WizardNavItem,
WizardNav,
WizardHeader
} from '@patternfly/react-core';
import { Modal as ModalDeprecated, ModalVariant as ModalVariantDeprecated } from '@patternfly/react-core/deprecated';
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
import SlackHashIcon from '@patternfly/react-icons/dist/esm/icons/slack-hash-icon';
import CogsIcon from '@patternfly/react-icons/dist/esm/icons/cogs-icon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import React from 'react';
import { Button, Wizard, WizardStep, WizardHeader } from '@patternfly/react-core';
import { Modal as ModalDeprecated, ModalVariant as ModalVariantDeprecated } from '@patternfly/react-core/deprecated';
import { Button, Modal, ModalVariant, Wizard, WizardHeader, WizardStep } from '@patternfly/react-core';

export const WizardWithinModal = () => {
export const WizardWithinModal: React.FunctionComponent = () => {
const [isModelOpen, setIsModalOpen] = React.useState(false);

return (
<>
<Button onClick={() => setIsModalOpen(true)}>Show Modal</Button>

<ModalDeprecated
<Modal
isOpen={isModelOpen}
showClose={false}
aria-label="Wizard modal"
hasNoBodyWrapper
onEscapePress={() => setIsModalOpen(false)}
variant={ModalVariantDeprecated.medium}
variant={ModalVariant.medium}
>
<Wizard
height={400}
Expand Down Expand Up @@ -43,7 +40,7 @@ export const WizardWithinModal = () => {
Review step content
</WizardStep>
</Wizard>
</ModalDeprecated>
</Modal>
</>
);
};
Loading