use Tag component instead

This commit is contained in:
Florian Scholdei
2019-09-16 17:17:26 +02:00
parent dd6458b1cb
commit cab4f0fcce
2 changed files with 14 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
//@flow
import React from "react";
import injectSheet from "react-jss";
import classNames from "classnames";
import { translate } from "react-i18next";
import { Tag } from "@scm-manager/ui-components";
type Props = {
system?: boolean,
@@ -25,9 +25,11 @@ class SystemRoleTag extends React.Component<Props> {
if (system) {
return (
<span className={classNames("tag is-dark", classes.tag)}>
{t("repositoryRole.system")}
</span>
<Tag
className={classes.tag}
color="dark"
label={t("repositoryRole.system")}
/>
);
}
return null;

View File

@@ -1,11 +1,13 @@
//@flow
import React from "react";
import injectSheet from "react-jss";
import classNames from "classnames";
import { translate } from "react-i18next";
import { Tag } from "@scm-manager/ui-components";
type Props = {
defaultBranch?: boolean,
// context props
classes: any,
t: string => string
};
@@ -23,9 +25,11 @@ class DefaultBranchTag extends React.Component<Props> {
if (defaultBranch) {
return (
<span className={classNames("tag is-dark", classes.tag)}>
{t("branch.defaultTag")}
</span>
<Tag
className={classes.tag}
color="dark"
label={t("branch.defaultTag")}
/>
);
}
return null;