diff --git a/docs/src/modules/components/ApiPage.js b/docs/src/modules/components/ApiPage.js index 1b5e432640108..b742c1362129f 100644 --- a/docs/src/modules/components/ApiPage.js +++ b/docs/src/modules/components/ApiPage.js @@ -14,6 +14,7 @@ import { useTranslate, useUserLanguage } from 'docs/src/modules/utils/i18n'; import HighlightedCode from 'docs/src/modules/components/HighlightedCode'; import MarkdownElement from 'docs/src/modules/components/MarkdownElement'; import AppLayoutDocs from 'docs/src/modules/components/AppLayoutDocs'; +import Ad from 'docs/src/modules/components/Ad'; const Asterisk = styled('abbr')(({ theme }) => ({ color: theme.palette.error.main })); @@ -212,8 +213,8 @@ Heading.propTypes = { level: PropTypes.string, }; -function ApiDocs(props) { - const { descriptions, pageContent } = props; +export default function ApiPage(props) { + const { descriptions, disableAd = false, pageContent } = props; const t = useTranslate(); const userLanguage = useUserLanguage(); @@ -310,7 +311,7 @@ function ApiDocs(props) { return (

{componentName} API

- + {description} + {disableAd ? null : } @@ -411,13 +418,12 @@ function ApiDocs(props) { ); } -ApiDocs.propTypes = { +ApiPage.propTypes = { descriptions: PropTypes.object.isRequired, + disableAd: PropTypes.bool, pageContent: PropTypes.object.isRequired, }; if (process.env.NODE_ENV !== 'production') { - ApiDocs.propTypes = exactProp(ApiDocs.propTypes); + ApiPage.propTypes = exactProp(ApiPage.propTypes); } - -export default ApiDocs; diff --git a/yarn.lock b/yarn.lock index 162886c8e1763..d3a0652c1717c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2479,8 +2479,8 @@ react-transition-group "^4.4.5" "@mui/monorepo@https://github.com/mui/material-ui.git#master": - version "5.10.14" - resolved "https://github.com/mui/material-ui.git#1b86330da8fff81ce5c28b0c5da0cebeb2be6932" + version "5.10.16" + resolved "https://github.com/mui/material-ui.git#b8e30a4b7c668ede64d5f1f76c00401590c977c1" "@mui/private-theming@^5.10.14": version "5.10.14"