From 78e19363a8269a0739559e83b2e99c770cd8c2da Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 5 Jan 2018 18:16:23 -0800 Subject: [PATCH] Undo changes to GuideSection. --- .../components/guide_section/guide_section.js | 34 ++----------------- 1 file changed, 3 insertions(+), 31 deletions(-) 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 (