mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
fix ui bug
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
import styled from "styled-components";
|
||||||
|
|
||||||
|
const Flex = styled.div`
|
||||||
|
&.field:not(:last-child) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
className?: string,
|
className?: string,
|
||||||
@@ -14,14 +21,18 @@ class ButtonAddons extends React.Component<Props> {
|
|||||||
const childWrapper = [];
|
const childWrapper = [];
|
||||||
React.Children.forEach(children, child => {
|
React.Children.forEach(children, child => {
|
||||||
if (child) {
|
if (child) {
|
||||||
childWrapper.push(<p className="control" key={childWrapper.length}>{child}</p>);
|
childWrapper.push(
|
||||||
|
<p className="control" key={childWrapper.length}>
|
||||||
|
{child}
|
||||||
|
</p>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames("field", "has-addons", className)}>
|
<Flex className={classNames("field", "has-addons", className)}>
|
||||||
{childWrapper}
|
{childWrapper}
|
||||||
</div>
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { translate } from "react-i18next";
|
import {translate} from "react-i18next";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
import {ExtensionPoint} from "@scm-manager/ui-extensions";
|
||||||
import type { File, Repository } from "@scm-manager/ui-types";
|
import type {File, Repository} from "@scm-manager/ui-types";
|
||||||
import {
|
import {DateFromNow, ErrorNotification, FileSize, Icon} from "@scm-manager/ui-components";
|
||||||
DateFromNow,
|
import {getSources} from "../modules/sources";
|
||||||
FileSize,
|
|
||||||
ErrorNotification,
|
|
||||||
Icon
|
|
||||||
} from "@scm-manager/ui-components";
|
|
||||||
import { getSources } from "../modules/sources";
|
|
||||||
import FileButtonAddons from "../components/content/FileButtonAddons";
|
import FileButtonAddons from "../components/content/FileButtonAddons";
|
||||||
import SourcesView from "./SourcesView";
|
import SourcesView from "./SourcesView";
|
||||||
import HistoryView from "./HistoryView";
|
import HistoryView from "./HistoryView";
|
||||||
@@ -34,7 +29,7 @@ type State = {
|
|||||||
errorFromExtension?: Error
|
errorFromExtension?: Error
|
||||||
};
|
};
|
||||||
|
|
||||||
const VCenteredChild = styled.article`
|
const VCenteredChild = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user