diff --git a/packages/dev-tools-pages/ts/components/Code.tsx b/packages/dev-tools-pages/ts/components/Code.tsx
index 84ce43f84c..f04d5aab84 100644
--- a/packages/dev-tools-pages/ts/components/Code.tsx
+++ b/packages/dev-tools-pages/ts/components/Code.tsx
@@ -62,13 +62,12 @@ const Base =
display: flex;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
`
- : `
- padding: 1.5rem;
- `}
+ : ``}
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
+
`;
const StyledCodeDiff = styled(({ gutterLength, children, ...props }: any) => {children}
)`
@@ -113,6 +112,14 @@ const StyledCodeDiff = styled(({ gutterLength, children, ...props }: any) =>
+ !props.diff
+ ? `
+ padding: 1.5rem;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ `
+ : ``};
`;
const StyledCopyInput = styled.textarea`
@@ -141,7 +148,6 @@ class Code extends React.Component {
const code = children as string;
if (language !== undefined) {
- /* console.log(code); */
const { default: highlight } = await System.import(/* webpackChunkName: 'highlightjs' */ 'ts/highlight');
this.setState({
@@ -182,7 +188,7 @@ class Code extends React.Component {
return (
-
+
{hlCode === undefined ? children : null}