mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
changed panel usage + added pannel-footer
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user