+ );
+ }
+}
diff --git a/src/Modal/Modal.example.js b/src/Modal/Modal.example.js
index 2f83311..2d46d14 100644
--- a/src/Modal/Modal.example.js
+++ b/src/Modal/Modal.example.js
@@ -1,7 +1,7 @@
import React from 'react';
import Modal from './Modal';
import Button from '../Button';
-import Box from '../Box';
+import Input from '../Form/Input';
export default class ModalDemo extends React.Component {
state = {
@@ -32,11 +32,22 @@ export default class ModalDemo extends React.Component {
-
+
- {body}
+ <>
+ {body}
+
+ >
-
+ {bodyTwo}
diff --git a/src/Modal/Modal.js b/src/Modal/Modal.js
index ade8f15..5a931ce 100644
--- a/src/Modal/Modal.js
+++ b/src/Modal/Modal.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { keyframes, css } from 'styled-components';
import * as animations from 'react-animations';
import { Transition } from 'react-transition-group';
+import FocusLock from 'react-focus-lock';
import Portal from '../Portal';
import Flex from '../Flex';
import Box from '../Box';
@@ -105,10 +106,12 @@ function Modal({ children, title, animationDuration, showClose, onClose, open, .
{state => (
-
- {title && }
- {children}
-
+
+
+ {title && }
+ {children}
+
+
)}
diff --git a/src/Modal/Modal.mdx b/src/Modal/Modal.mdx
index 56d3b5a..f7b3bb0 100644
--- a/src/Modal/Modal.mdx
+++ b/src/Modal/Modal.mdx
@@ -6,6 +6,7 @@ name: Modal
import { Playground, PropsTable } from 'docz'
import Modal from './Modal'
import ModalExample from './Modal.example'
+import ModalDropdownExample from './Modal.dropdownexample'
# Modal
@@ -29,3 +30,11 @@ When modals become too long for the user’s viewport or device, they scroll ind
{new Array(50).fill(null).map((_, i) =>
I'm really long annoying content.
)}
} />
+
+## Handling Dropdown Triggered Content
+
+When modals are triggered by dropdowns with returnFocus set to true, modals still receive focus.
+
+
+
+