diff --git a/docs/pages/api/root-ref.md b/docs/pages/api/root-ref.md index 9713cc8e77f918..0c172462a38279 100644 --- a/docs/pages/api/root-ref.md +++ b/docs/pages/api/root-ref.md @@ -14,7 +14,7 @@ import RootRef from '@material-ui/core/RootRef'; ⚠️⚠️⚠️ If you want the DOM element of a Material-UI component check out -[/getting-started/faq/#how-can-i-access-the-dom-element](FAQ: How can I access the DOM element?) +[FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element) first. This component uses `findDOMNode` which is deprecated in React.StrictMode. diff --git a/docs/pages/getting-started/templates/album.js b/docs/pages/getting-started/templates/album.js index e352a18ab05ca4..5955b413ea3327 100644 --- a/docs/pages/getting-started/templates/album.js +++ b/docs/pages/getting-started/templates/album.js @@ -1,21 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import Album from 'docs/src/pages/getting-started/templates/album/Album'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/blog.js b/docs/pages/getting-started/templates/blog.js index 870eebc9164716..454d85d90a68e6 100644 --- a/docs/pages/getting-started/templates/blog.js +++ b/docs/pages/getting-started/templates/blog.js @@ -1,21 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import Blog from 'docs/src/pages/getting-started/templates/blog/Blog'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/dashboard.js b/docs/pages/getting-started/templates/dashboard.js index bccb7c69aea2fa..8953c41c0fb66e 100644 --- a/docs/pages/getting-started/templates/dashboard.js +++ b/docs/pages/getting-started/templates/dashboard.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import Dashboard from 'docs/src/pages/getting-started/templates/dashboard/Dashboard'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/pricing.js b/docs/pages/getting-started/templates/pricing.js index 400e25396e78cf..1303dd3dae5352 100644 --- a/docs/pages/getting-started/templates/pricing.js +++ b/docs/pages/getting-started/templates/pricing.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import Pricing from 'docs/src/pages/getting-started/templates/pricing/Pricing'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/sign-in-side.js b/docs/pages/getting-started/templates/sign-in-side.js index d5949b3d99c564..b86459bc48f0e4 100644 --- a/docs/pages/getting-started/templates/sign-in-side.js +++ b/docs/pages/getting-started/templates/sign-in-side.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import SignInSide from 'docs/src/pages/getting-started/templates/sign-in-side/SignInSide'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/sign-in.js b/docs/pages/getting-started/templates/sign-in.js index 02e8fc2fbec083..ab6cbc1eaf4b67 100644 --- a/docs/pages/getting-started/templates/sign-in.js +++ b/docs/pages/getting-started/templates/sign-in.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import SignIn from 'docs/src/pages/getting-started/templates/sign-in/SignIn'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/sign-up.js b/docs/pages/getting-started/templates/sign-up.js index 2817dd718180d5..63c13dada633f9 100644 --- a/docs/pages/getting-started/templates/sign-up.js +++ b/docs/pages/getting-started/templates/sign-up.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import SignUp from 'docs/src/pages/getting-started/templates/sign-up/SignUp'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/pages/getting-started/templates/sticky-footer.js b/docs/pages/getting-started/templates/sticky-footer.js index b8a4d5346266b9..7d25703551fba2 100644 --- a/docs/pages/getting-started/templates/sticky-footer.js +++ b/docs/pages/getting-started/templates/sticky-footer.js @@ -1,24 +1,13 @@ import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import AppTheme from 'docs/src/modules/components/AppTheme'; import StickyFooter from 'docs/src/pages/getting-started/templates/sticky-footer/StickyFooter'; -function Page(props) { +export default function Page() { return ( - + ); } - -Page.propTypes = { - t: PropTypes.func.isRequired, -}; - -export default connect(state => ({ t: state.options.t }))(Page); diff --git a/docs/src/modules/components/AppTheme.js b/docs/src/modules/components/AppTheme.js index d9488751bd384b..3641c5ba43746b 100644 --- a/docs/src/modules/components/AppTheme.js +++ b/docs/src/modules/components/AppTheme.js @@ -7,10 +7,13 @@ import { ThemeProvider } from '@material-ui/styles'; const defaultTheme = createMuiTheme(); export default function AppTheme(props) { - const { children, description, title } = props; + const { children } = props; + return ( - + + + {children} ); @@ -18,6 +21,4 @@ export default function AppTheme(props) { AppTheme.propTypes = { children: PropTypes.element.isRequired, - description: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, }; diff --git a/docs/src/modules/components/Link.js b/docs/src/modules/components/Link.js index bf74a86c32c202..971292425888a6 100644 --- a/docs/src/modules/components/Link.js +++ b/docs/src/modules/components/Link.js @@ -41,7 +41,7 @@ function Link(props) { [activeClassName]: router.pathname === props.href && activeClassName, }); - if (userLanguage !== 'en' && other.href.indexOf('/') === 0) { + if (userLanguage !== 'en' && other.href.indexOf('/') === 0 && other.href.indexOf('/blog') !== 0) { other.as = `/${userLanguage}${other.href}`; } diff --git a/docs/src/modules/utils/parseMarkdown.js b/docs/src/modules/utils/parseMarkdown.js index 3e11c841b7e9f5..9e237bc9aa7b5f 100644 --- a/docs/src/modules/utils/parseMarkdown.js +++ b/docs/src/modules/utils/parseMarkdown.js @@ -24,7 +24,10 @@ export function getHeaders(markdown) { } if (headers.components) { - headers.components = headers.components.split(', ').sort(); + headers.components = headers.components + .split(',') + .map(x => x.trim()) + .sort(); } else { headers.components = []; } diff --git a/docs/src/pages/customization/density/density.md b/docs/src/pages/customization/density/density.md index 3572980951224b..eec170727f69fd 100644 --- a/docs/src/pages/customization/density/density.md +++ b/docs/src/pages/customization/density/density.md @@ -17,19 +17,19 @@ reducing the size. The following components have props applying higher density: -- [Button](/api/button) -- [Fab](/api/fab) -- [FilledInput](/api/filled-input) -- [FormControl](/api/form-control) -- [FormHelperText](/api/form-helper-text) -- [IconButton](/api/icon-button) -- [InputBase](/api/input-base) -- [InputLabel](/api/input-label) -- [ListItem](/api/list-item) -- [OutlinedInput](/api/outlined-input) -- [Table](/api/table) -- [TextField](/api/text-field) -- [Toolbar](/api/toolbar) +- [Button](/api/button/) +- [Fab](/api/fab/) +- [FilledInput](/api/filled-input/) +- [FormControl](/api/form-control/) +- [FormHelperText](/api/form-helper-text/) +- [IconButton](/api/icon-button/) +- [InputBase](/api/input-base/) +- [InputLabel](/api/input-label/) +- [ListItem](/api/list-item/) +- [OutlinedInput](/api/outlined-input/) +- [Table](/api/table/) +- [TextField](/api/text-field/) +- [Toolbar](/api/toolbar/) ## Explore theme density diff --git a/packages/material-ui/src/RootRef/RootRef.js b/packages/material-ui/src/RootRef/RootRef.js index 1763bcb18f8fd3..32494cac752c62 100644 --- a/packages/material-ui/src/RootRef/RootRef.js +++ b/packages/material-ui/src/RootRef/RootRef.js @@ -7,7 +7,7 @@ import { setRef } from '../utils/reactHelpers'; /** * ⚠️⚠️⚠️ * If you want the DOM element of a Material-UI component check out - * [/getting-started/faq/#how-can-i-access-the-dom-element](FAQ: How can I access the DOM element?) + * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element) * first. * * This component uses `findDOMNode` which is deprecated in React.StrictMode.