changed panel usage + added pannel-footer

This commit is contained in:
Florian Scholdei
2019-01-29 17:12:18 +01:00
parent d70c2bd624
commit 258e11025a
6 changed files with 58 additions and 18 deletions

View File

@@ -8,12 +8,15 @@ import { ExtensionPoint } from "@scm-manager/ui-extensions";
import { getContentType } from "./contentType";
import type { File, Repository } from "@scm-manager/ui-types";
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
import injectSheet from "react-jss";
import classNames from "classnames";
type Props = {
repository: Repository,
file: File,
revision: string,
path: string
path: string,
classes: any
};
type State = {
@@ -23,6 +26,12 @@ type State = {
error?: Error
};
const styles = {
toCenterContent: {
display: "block"
}
};
class SourcesView extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
@@ -78,7 +87,7 @@ class SourcesView extends React.Component<Props, State> {
}
render() {
const { file } = this.props;
const { file, classes } = this.props;
const { loaded, error } = this.state;
if (!file || !loaded) {
@@ -90,8 +99,8 @@ class SourcesView extends React.Component<Props, State> {
const sources = this.showSources();
return <>{sources}</>;
return <div className={classNames("panel-block", classes.toCenterContent)}>{sources}</div>;
}
}
export default SourcesView;
export default injectSheet(styles)(SourcesView);