From acef7e6e71eb2cb093ebfc1ec47598b1fab4f29b Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Thu, 21 Feb 2019 17:21:04 +0100 Subject: [PATCH] fixed a small bug that pageactions border without content were displayed on mobile page but was not allowed to --- .../packages/ui-components/src/layout/Page.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scm-ui-components/packages/ui-components/src/layout/Page.js b/scm-ui-components/packages/ui-components/src/layout/Page.js index 4bfa3aae03..eea9f66f72 100644 --- a/scm-ui-components/packages/ui-components/src/layout/Page.js +++ b/scm-ui-components/packages/ui-components/src/layout/Page.js @@ -44,11 +44,22 @@ class Page extends React.Component { renderPageHeader() { const { title, subtitle, children, classes } = this.props; - let content = null; + let pageActions = null; let pageActionsExists = false; React.Children.forEach(children, child => { if (child && child.type.name === PageActions.name) { - content = child; + pageActions = ( +
+
+ {child} +
+
+ ); pageActionsExists = true; } }); @@ -63,9 +74,7 @@ class Page extends React.Component { <Subtitle subtitle={subtitle} /> </div> - <div className="column is-two-fifths"> - <div className={classNames(classes.spacing, "is-mobile-create-button-spacing")}>{content}</div> - </div> + {pageActions} </div> {underline} </>