diff --git a/docs/src/modules/components/Demo.js b/docs/src/modules/components/Demo.js index 1df8ca92ad480d..a3be4bafee5f3e 100644 --- a/docs/src/modules/components/Demo.js +++ b/docs/src/modules/components/Demo.js @@ -8,6 +8,7 @@ import { withStyles } from '@material-ui/core/styles'; import IconButton from '@material-ui/core/IconButton'; import useMediaQuery from '@material-ui/core/useMediaQuery'; import Collapse from '@material-ui/core/Collapse'; +import NoSsr from '@material-ui/core/NoSsr'; import EditIcon from '@material-ui/icons/Edit'; import CodeIcon from '@material-ui/icons/Code'; import GitHubIcon from '@material-ui/icons/GitHub'; @@ -75,6 +76,7 @@ const styles = theme => ({ flip: false, top: 0, right: theme.spacing(1), + height: theme.spacing(6), }, justifyContent: 'space-between', }, @@ -91,6 +93,7 @@ const styles = theme => ({ }, '& pre': { overflow: 'auto', + lineHeight: 1.5, margin: '0px !important', maxHeight: 1000, }, @@ -298,115 +301,121 @@ function Demo(props) {
{demoOptions.hideHeader ? null : (
- -
- - - - - - - - - - - {demoOptions.hideEditButton ? null : ( + + +
- + - )} - - - - - - {t('copySource')} - - {demoOptions.hideEditButton ? null : ( - - {t('stackblitz')} - + + + + {demoOptions.hideEditButton ? null : ( + + + + + )} - - {t('copySourceLinkJS')} - - + + - {t('copySourceLinkTS')} - - -
+ + {t('copySource')} + + {demoOptions.hideEditButton ? null : ( + + {t('stackblitz')} + + )} + + {t('copySourceLinkJS')} + + + {t('copySourceLinkTS')} + + +
+
)} diff --git a/docs/src/modules/components/MarkdownElement.js b/docs/src/modules/components/MarkdownElement.js index e0b611f2431534..7307a1d52bf570 100644 --- a/docs/src/modules/components/MarkdownElement.js +++ b/docs/src/modules/components/MarkdownElement.js @@ -29,15 +29,16 @@ renderer.heading = (text, level) => { // eslint-disable-next-line no-underscore-dangle const escapedText = textToHash(text, global.__MARKED_UNIQUE__); - return ( - ` - - ${text}` + - ` - - - ` - ); + return [ + ``, + `${text}`, + typeof window !== 'undefined' + ? `` + + `` + + `` + : null, + ``, + ].join(''); }; const externs = [ @@ -194,21 +195,19 @@ const styles = theme => ({ wordBreak: 'break-all', }, '& .anchor-link-style': { - opacity: 0, // To prevent the link to get the focus. display: 'none', }, '&:hover .anchor-link-style': { display: 'inline-block', - opacity: 1, padding: '0 8px', - color: theme.palette.text.hint, + color: theme.palette.text.secondary, '&:hover': { - color: theme.palette.text.secondary, + color: theme.palette.text.primary, }, '& svg': { - width: '0.55em', - height: '0.55em', + width: '0.7em', + height: '0.7em', fill: 'currentColor', }, },