diff --git a/src-docs/src/components/guide_section/guide_section.js b/src-docs/src/components/guide_section/guide_section.js index ed43a147a6e2..c236c1f3b1da 100644 --- a/src-docs/src/components/guide_section/guide_section.js +++ b/src-docs/src/components/guide_section/guide_section.js @@ -1,13 +1,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import classNames from 'classnames'; import { GuideSandboxChrome, } from '..'; import { - EuiButtonIcon, EuiCodeBlock, EuiErrorBoundary, EuiSpacer, @@ -40,7 +38,6 @@ export class GuideSection extends Component { sandbox: { isChromeVisible: props.isSandbox ? false : undefined, }, - isCodeFullScreen: false, }; } @@ -50,12 +47,6 @@ export class GuideSection extends Component { }); } - onToggleCodeFullScreen = () => { - this.setState({ - isCodeFullScreen: !this.state.isCodeFullScreen, - }); - }; - onToggleSandboxChrome = () => { this.setState({ sandbox: { @@ -64,14 +55,6 @@ export class GuideSection extends Component { }); } - componentWillUpdate(nextProps, nextState) { - if (nextState.isCodeFullScreen) { - document.body.classList.add('euiBody-hasOverlayMask'); - } else { - document.body.classList.remove('euiBody-hasOverlayMask'); - } - } - renderTabs() { return this.tabs.map(tab => ( sourceObject.type === name); - const classes = classNames('guideCode', { - 'guideCode-isExpanded': this.state.isCodeFullScreen, - }); return ( -
+
{source.code} - -
); } @@ -171,7 +143,7 @@ export class GuideSection extends Component { } render() { - const chrome = this.state.isCodeFullScreen ? undefined : this.renderChrome(); + const chrome = this.renderChrome(); return (