diff --git a/package.json b/package.json
index d93713e062..16f57ebfe6 100644
--- a/package.json
+++ b/package.json
@@ -136,7 +136,6 @@
"dependencies": {
"@babel/runtime": "^7.3.4",
"@popperjs/core": "^2.4.4",
- "body-scroll-lock": "^2.5.8",
"classnames": "^2.2.5",
"cozy-interapp": "0.5.4",
"date-fns": "^1.28.5",
@@ -147,6 +146,7 @@
"react-markdown": "^4.0.8",
"react-pdf": "^4.0.5",
"react-popper": "^2.2.3",
+ "react-remove-scroll": "^2.4.0",
"react-select": "2.2.0",
"react-swipeable-views": "0.13.3"
},
diff --git a/react/ActionMenu/Readme.md b/react/ActionMenu/Readme.md
index cae813632c..a15454c391 100644
--- a/react/ActionMenu/Readme.md
+++ b/react/ActionMenu/Readme.md
@@ -2,7 +2,7 @@ Use an ActionMenu to show a list of actions. ActionMenus automatically switch th
### Classic
-```
+```jsx
import ActionMenu, { ActionMenuItem, ActionMenuRadio } from 'cozy-ui/transpiled/react/ActionMenu';
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
import Icon from 'cozy-ui/transpiled/react/Icon';
@@ -39,7 +39,7 @@ desktop, we display a popper and not a BottomDrawer, context for the
user is not lost, so the ActionMenuHeader would be redundant. This is
why it is not rendered unless we are on mobile.
-```
+```jsx
import ActionMenu, { ActionMenuItem, ActionMenuHeader } from './index';
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
import Icon from '../Icon';
@@ -67,7 +67,7 @@ const hideMenu = () => setState({ menuDisplayed: false });
### With dedicated click handler
-```
+```jsx
import ActionMenu, { ActionMenuItem, ActionMenuHeader } from './index';
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
import Icon from '../Icon';
@@ -96,7 +96,7 @@ const hideMenu = () => setState({ menuDisplayed: false });
You can pass a reference to a custom DOM element through the `anchorElRef` prop to attach the menu to that element.
We use [popper.js](https://popper.js.org/docs/v2/) under the hood. You can use the `popperOptions` prop to pass options to the popper.js instance. This lets you control things like placement relative to the anchor, positioning strategies and more — refer to the popper doc for all the details.
-```
+```jsx
import ActionMenu, { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu';
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
import Icon from 'cozy-ui/transpiled/react/Icon';
@@ -121,3 +121,81 @@ const anchorRef = React.createRef();
}
```
+
+### Open Dialog from ActionMenu
+
+```jsx
+import ActionMenu, { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu';
+import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
+import Icon from 'cozy-ui/transpiled/react/Icon';
+import Dialog, {
+ DialogTitle,
+ DialogActions,
+ DialogContent,
+ DialogContentText,
+ DialogCloseButton,
+} from 'cozy-ui/transpiled/react/Dialog';
+import {
+ BreakpointsProvider
+} from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
+import MuiCozyTheme from 'cozy-ui/transpiled/react/MuiCozyTheme/'
+import Button from 'cozy-ui/transpiled/react/Button'
+
+const testRef = React.createRef();
+
+initialState = { menuDisplayed: isTesting(), modalOpened: isTesting() };
+
+const showMenu = () => setState({ menuDisplayed: true });
+const hideMenu = () => setState({ menuDisplayed: false });
+
+const anchorRef = React.createRef();
+const onClose = () => setState({ modalOpened: !state.modalOpened });
+
+