From a5613f088e26cca34ab69853a7dd1294d8041c2d Mon Sep 17 00:00:00 2001 From: Eric Binnion Date: Thu, 3 Dec 2015 10:30:29 -0600 Subject: [PATCH] Framework: Fixes uncentered logged-out layouts with no sidebar --- client/layout/logged-out.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/layout/logged-out.jsx b/client/layout/logged-out.jsx index a56c277309a28f..3f4ba8df5cea67 100644 --- a/client/layout/logged-out.jsx +++ b/client/layout/logged-out.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react' ); +var React = require( 'react' ), + classNames = require( 'classnames' ); /** * Internal dependencies @@ -15,15 +16,19 @@ module.exports = React.createClass( { getInitialState: function() { return { - section: undefined + section: undefined, + noSidebar: false }; }, render: function() { - var sectionClass = 'wp' + ( this.state.section ? ' is-section-' + this.state.section : '' ); + var sectionClass = this.state.section ? ' is-section-' + this.state.section : '', + classes = classNames( 'wp', sectionClass, { + 'has-no-sidebar': this.state.noSidebar + } ); return ( -
+