mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
fixed a small bug that pageactions border without content were displayed on mobile page but was not allowed to
This commit is contained in:
@@ -44,11 +44,22 @@ class Page extends React.Component<Props> {
|
|||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { title, subtitle, children, classes } = this.props;
|
const { title, subtitle, children, classes } = this.props;
|
||||||
|
|
||||||
let content = null;
|
let pageActions = null;
|
||||||
let pageActionsExists = false;
|
let pageActionsExists = false;
|
||||||
React.Children.forEach(children, child => {
|
React.Children.forEach(children, child => {
|
||||||
if (child && child.type.name === PageActions.name) {
|
if (child && child.type.name === PageActions.name) {
|
||||||
content = child;
|
pageActions = (
|
||||||
|
<div className="column is-two-fifths">
|
||||||
|
<div
|
||||||
|
className={classNames(
|
||||||
|
classes.spacing,
|
||||||
|
"is-mobile-create-button-spacing"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{child}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
pageActionsExists = true;
|
pageActionsExists = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -63,9 +74,7 @@ class Page extends React.Component<Props> {
|
|||||||
<Title title={title} />
|
<Title title={title} />
|
||||||
<Subtitle subtitle={subtitle} />
|
<Subtitle subtitle={subtitle} />
|
||||||
</div>
|
</div>
|
||||||
<div className="column is-two-fifths">
|
{pageActions}
|
||||||
<div className={classNames(classes.spacing, "is-mobile-create-button-spacing")}>{content}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{underline}
|
{underline}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user