Skip to content

Commit

Permalink
[docs][material-ui] Add comment about code to be removed from Drawer …
Browse files Browse the repository at this point in the history
…demo (mui#39678)
  • Loading branch information
samuelsycamore authored Oct 31, 2023
1 parent 8a3f0c4 commit b0280be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/data/material/components/drawers/ResponsiveDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function ResponsiveDrawer(props) {
</div>
);

// Remove this const when copying and pasting into your project.
const container = window !== undefined ? () => window().document.body : undefined;

return (
Expand Down Expand Up @@ -158,7 +159,7 @@ function ResponsiveDrawer(props) {
ResponsiveDrawer.propTypes = {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
* Remove this when copying and pasting into your project.
*/
window: PropTypes.func,
};
Expand Down
3 changes: 2 additions & 1 deletion docs/data/material/components/drawers/ResponsiveDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const drawerWidth = 240;
interface Props {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
* Remove this when copying and pasting into your project.
*/
window?: () => Window;
}
Expand Down Expand Up @@ -66,6 +66,7 @@ export default function ResponsiveDrawer(props: Props) {
</div>
);

// Remove this const when copying and pasting into your project.
const container = window !== undefined ? () => window().document.body : undefined;

return (
Expand Down

0 comments on commit b0280be

Please sign in to comment.