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