vcentered default branch label + more spacing

This commit is contained in:
Florian Scholdei
2019-04-01 15:58:07 +02:00
parent 7442712cd7
commit d8a33e0fc2
3 changed files with 34 additions and 11 deletions

View File

@@ -2,17 +2,29 @@
import React from "react";
import { Link } from "react-router-dom";
import type { Branch } from "@scm-manager/ui-types";
import injectSheet from "react-jss";
import classNames from "classnames";
type Props = {
baseUrl: string,
branch: Branch
branch: Branch,
classes: any
};
export default class BranchRow extends React.Component<Props> {
const styles = {
tag: {
marginLeft: "0.75rem",
verticalAlign: "inherit"
}
};
class BranchRow extends React.Component<Props> {
renderLink(to: string, label: string, defaultBranch: boolean) {
const { classes } = this.props;
let showLabel = null;
if (defaultBranch) {
showLabel = <span className="tag is-dark">Default</span>;
showLabel = <span className={classNames("tag is-dark", classes.tag)}>Default</span>;
}
return (
<Link to={to}>
@@ -31,3 +43,5 @@ export default class BranchRow extends React.Component<Props> {
);
}
}
export default injectSheet(styles)(BranchRow);