diff --git a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx
index ad0ff55a86..5c657e5f47 100644
--- a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx
+++ b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx
@@ -23,6 +23,9 @@ export const parameters = {
+## For DEMO and debugging purposes:
+
+
## Usage
Use a Modal to create a dialog on sits on top of a full screen overlay.
@@ -33,7 +36,7 @@ Use a Modal to create a dialog on sits on top of a full screen overlay.
Setting the `size` to `'fluid'` will make the width of the Modal fit its content.
-
+
### Large
diff --git a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx
index a84b8fa405..a6ea657421 100644
--- a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx
+++ b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx
@@ -1,8 +1,10 @@
import {
Box,
Checkbox,
+ Coachmark,
FillButton,
FlexBox,
+ InfoTip,
Modal,
StrokeButton,
Text,
@@ -532,3 +534,92 @@ export const ConfirmationOnClose: React.FC = () => {
>
);
};
+
+export const InfoTipInsideModal: Story = {
+ args: {
+ placement: 'inline',
+ info: 'This is helpful information about the Modal. Try pressing Escape!',
+ },
+ render: function InfoTipInsideModal(args) {
+ const [isModalOpen, setIsModalOpen] = useState(false);
+ const [showCoachmark, setShowCoachmark] = useState(false);
+
+ return (
+
+ setIsModalOpen(true)}>
+ Open Modal with InfoTip Inside
+
+
+
+
+ Test InfoTip Inside Modal (Inline):
+
+
+ Click "Open Modal with InfoTip Inside"
+ Click or press Enter on the InfoTip button (ⓘ icon)
+ Press Escape - should close InfoTip (Modal stays open)
+ Press Escape again - should close Modal{' '}
+
+
+
+ setIsModalOpen(false)}
+ >
+
+ This modal contains an InfoTip below:
+
+
+
+ Some text that needs explanation
+
+
+
+
+
+ The InfoTip inside this modal can be closed with Escape without
+ closing the modal itself. Inline placement works correctly.
+
+
+
+
+ This modal also contains a Coachmark
+
+ (
+
+
+ This Coachmark is inside a Modal. Try pressing Escape!
+
+ setShowCoachmark(false)}
+ >
+ Got it
+
+
+ )}
+ shouldShow={showCoachmark}
+ >
+ setShowCoachmark(true)}>
+ Show Coachmark
+
+
+
+
+ setIsModalOpen(false)}>
+ Close Modal
+
+
+
+
+ );
+ },
+};