Build new PermissionsWrapper and use doubled-row for permissions and repositoryRoles overview, Remove duplicated PermissionCheckbox

This commit is contained in:
Florian Scholdei
2019-11-28 02:04:18 +01:00
parent 53147db0e2
commit a603962998
6 changed files with 116 additions and 93 deletions

View File

@@ -1,29 +0,0 @@
import React from "react";
import { WithTranslation, withTranslation } from "react-i18next";
import { Checkbox } from "@scm-manager/ui-components";
type Props = WithTranslation & {
disabled: boolean;
name: string;
checked: boolean;
onChange?: (value: boolean, name?: string) => void;
};
class PermissionCheckbox extends React.Component<Props> {
render() {
const { t } = this.props;
return (
<Checkbox
key={this.props.name}
name={this.props.name}
helpText={t("verbs.repository." + this.props.name + ".description")}
label={t("verbs.repository." + this.props.name + ".displayName")}
checked={this.props.checked}
onChange={this.props.onChange}
disabled={this.props.disabled}
/>
);
}
}
export default withTranslation("plugins")(PermissionCheckbox);